05-13-2005 02:11 AM
Sometimes, few of their programs "runaway" or were loop inside in Unix. then later those useless processes to the top of other running programs by different users.
Users use top to find out those runaway processes running. But our SA hope know those processes as early as we can.
I tried to time command to find them (runaway processes) in early stage. For example, find the processes stay alive 5 minutes long.
Does any one know how to get a process 5 minutes long command. I hope that I could put them in script, try to send me a email if a assigned time broken.
05-13-2005 02:20 AM
UNIX95= ps -eo pid,etime,comm | grep procname
The format of the etime parameter is:
You can use this to check for MINUTES > 5
05-13-2005 03:35 AM
Below part work for Linux
ps -eo pid,etime,comm | awk -F: '$2 >= 5 && /bonobo-activati/'
Thank yopu very much