How to find zombie processes on linux

My NAGIOS monitor alerted me that of my dedicated server has 10 Zombie processes, how to find Zombie processes via command line on Linux especially CentOS?

 ps aux | awk '{ print $8 " " $2 }' | grep -w Z 

So it returns state (Z = Zombie) and the process id (PID)

root@sirius [~]#  ps aux | awk '{ print $8 " " $2 }' | grep -w Z
Z 4399
Z 4435
Z 4868
Z 5143
Z 5400
Z 5834
Z 7584
Z 11943
Z 16286
Z 24365

Technically, you cannot kill a zombie process since its already dead but the entry in the process table is not removed because the parent will access the result via the PID in the process table.

One thought on “How to find zombie processes on linux

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.