Determining if there are Zombie processes

From V.S.V., Inc.
Jump to: navigation, search
for i in `ls /proc`; do if [[ $i =~ '^[0-9]+$' ]]; then cat /proc/$i/status 2>/dev/null|grep 'State'|grep Z; fi; done

This can probably be improved to give a count and/or actually list the processes. As it is, it just lists "State: Z (zombie)" once for each zombie process.

Main_Page