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>
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?
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.
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
Sometimes zombie processes have the string <defunct> at the end in the output of top. Maybe that helps.
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.
displaying zombie processes Use this command to display all of your zombie processes: ps aux | awk '{ print $8 " " $2 }' | grep -w Z
Displaying Zombie processes Have a look here to sse how to display zombies: http://www.debian-administration.org/articles/261 But killing them is not possible as the zombies are dead already.
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.