Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to get a listing of hanging/zombie processes ?

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Does anyone have any handy tips on how to monitor hanging/zombie processes ?
I thought about combining the "ps" command with awk, but it's not really very helpful (assumes a hanging process has a PPID of 1) :

ps -ef |awk '{if ( $3= 1) print $1," "$2," " $3," "$5, " "$8 }' .. etc

Does anyone have any better ideas ?

Thanks in advance,
axepert
 
In my experience if you do a ps -ef | grep defunct this will usually tell you details of zombie processes, not that you can usually do anything to get rid of them other than reboot! HTH.
 
To get rid of a zombie process, you can kill its parent. But if its parent is the init process... you'll have to reboot to destroy it.
 
Thanks folks.

I was actually more concerned about runaway/hanging processes. ANyway, here's something I came up with for the on the DEC platform :

ps -eo %cpu -o state -o stime -o pid -o user -o cmd|grep `date +%b` |sort -rn|more

It checks for processes that were running earlier in the month sorted by highest CPU utilisation.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top