unix job control

Trying to find what command in unix we can fins the completed jobs for example a week before or all jobs completed week before.

1) Job history which is already completed. Not with logs or autosys/cron logs.
Unix system command or syatem logs of job history which already completed?

2) FTP jobs currently running ; other than ps -ef | grep ftp?
pal2kAsked:
Who is Participating?
 
woolmilkporcCommented:
1) No way with pure Unix. Consider enabling system and process accounting. Here is more:

http://www.math.iitb.ac.in/resources/manuals/Unix_Unleashed/Vol_1/ch21.htm
http://computer-forensics.sans.org/blog/2010/03/24/unix-system-accounting-and-process-accounting/

2) Try last ftp

Running sessions will show up as "Still logged in"

http://unixhelp.ed.ac.uk/CGI/man-cgi?last

System accounting will help here too (for completed jobs).

wmp

0
 
GnsCommented:
Woolmilkpork is quite correct... But cron jobs/at-jobs do leave another mark, provided they actually have output... It'll be sent as an email to the user who scheduled the job.
But job history, sort of... Nope.

--
-- Glenn
0
 
svsCommented:
ftpwho command may be available (it exists in proftpd, at least)
0
 
gheistCommented:
job control is something else from what you are asking for.

in UNIX job control is shell facility like using &, running fg or bg commands, ^Z etc - i.e running background jobs under control of shell.
on a mainframe it is something else, better known as spool in UNIX

To have proper control of "jobs" you need to maintain your own logging.
I.e when job starts you call
logger "!JOB!START! of type $* running as a PID $?"

when it ends
logger "!JOB!SUCCESS! ...

or it fails

....


1) depends of your definition of what a "JOB" is.

I would propose to finally enable process accounting ("man accton" on your system, or give us uname -a to figure out)

2) a drop of sarcasm

ps auxwww | grep ftp
ig it happens to be Linux "ps -C ftp"
0
 
gheistCommented:
PS in 99% of FTP ssenarios rsync or rbackup are better and safer options.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.