lost and found ( for me ? )

Small tips : How find/kill zombie processes


There are many ways to find out zombie processes , so this is one of examples.
# cat /etc/centos-release
CentOS release 6.2 (Final)

find zombie processes
# top -b -n 1 | grep Z
6072 root      20   0     0    0    0 Z  0.0  0.0   0:00.09 dumpcap <defunct>
6075 root      20   0     0    0    0 Z  0.0  0.0   0:00.11 dumpcap <defunct>

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

kill zombie processes
# kill -9 6072
# kill -9 6075

4 comments:

  1. Usually zombie processes are caused by program error.
    So no zombie processes mean that processes running
    on your Linux are normal.

    You can create a zombie process intentionally.
    Please check my post as below.

    http://lost-and-found-narihiro.blogspot.jp/2012/07/c-programming-how-to-create-zombie.html

    thanks!

    ReplyDelete
  2. It's a good thing that many versions of UNIX removes zombie processes automatically, so all we have to do is wait. But if not, there is always something that we can find on the internet depending what type of system we use.

    ReplyDelete
  3. hi,
    Yhea, i agree with you. it would be better to wait zombie processes are removed automatically by OS

    ReplyDelete

Note: Only a member of this blog may post a comment.