what to do about zombie processes ?

Discussion in 'Technical' started by Ovidiu, Nov 25, 2005.

  1. Ovidiu

    Ovidiu Active Member

    top shows I have 2 of them,
    what can I do to detect and kill them?
     
  2. themachine

    themachine HowtoForge Supporter


    If you are looking at top, the first column is the PID (Process ID). Quit out of top, and then you can execute the command:

    # kill <PID>

    The default kill signal is SIGTERM (15) which will attempt to kill the process cleanly. If it still failes to die off you can issue a SIGKILL(9) to trash the process and really kill it (uncleanly).

    # kill -9 <PID>
     
  3. Ovidiu

    Ovidiu Active Member

    I did not phrase my question good enough: top tells me I have 1 zombie process, I know how to kill it but how do I know which process is the zombie one?
     
  4. themachine

    themachine HowtoForge Supporter

    Who is the user running the zombie process? You can also look at:

    # ps -auwx | grep <pid>

    and perhaps you'll get more info from that output.
     
  5. Ovidiu

    Ovidiu Active Member

    still you did not get my question:

    tu run: # ps -auwx | grep <pid>

    I need to know the pid of the zombie process but all I know is that when I open top I see in the report on top: 1 zombie process I do not know which one is the zombie process, so I can't know its Pid :)
     
  6. themachine

    themachine HowtoForge Supporter

    I see now... why not try:

    # ps auxw | grep -i "zombie"


    Maybe that will do?
     
  7. falko

    falko Super Moderator

    Sometimes zombie processes have the string <defunct> at the end in the output of top. Maybe that helps.
     
  8. webstergd

    webstergd ISPConfig Developer

    Are you refering to a zombie process as a process or thread that has reached deadlock. ie no longer responding? If this is the case then their is no easy way to tell which process is causing the problem. Mostly it is trial and error. This is also extreamly dangerious to do. If you have a production environment and need a way to recover from deadlock there are a few solutions out available. Only problem is that deadlock solutions provide an a extreamly large amount of over head.

    Thus, solution is:
    personal or development comptuer - restart. If you need to track it you can also check your error logs

    development server - look into deadlock software solutions.
     
  9. nlsteffens

    nlsteffens New Member

    displaying zombie processes

    Use this command to display all of your zombie processes:

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

    Hans Moderator

    Last edited: Sep 6, 2007
  11. Ben

    Ben HowtoForge Supporter

    Well after a while having Zombies from time to time, I would say you do not really need to care about, except the number raises extremly fast or you have the feeling that sth. is not working correctly.
    E.g. one webserver, with the rsawebagent, produces one zombie per active httpd child, but that does not impact functionality, just looks ugly.
     

Share This Page