Operating System - HP-UX
1821540 Members
2147 Online
109633 Solutions
New Discussion юеВ

How to kill zombie process?

 
SOLVED
Go to solution
leereg_4
Advisor

How to kill zombie process?

As title.


Thanks in advance!
Always UNIX
7 REPLIES 7
KapilRaj
Honored Contributor

Re: How to kill zombie process?

Are u jocking ?,

ps -e f |grep zombie
note the pid
kill -9

Can u tell me what zombie is ?.
kaps
Nothing is impossible
leereg_4
Advisor

Re: How to kill zombie process?

The zombie is netscape.
I have tried with:
#kill -9 10257
for several times.But it does not work!
Always UNIX
Stefan Farrelly
Honored Contributor
Solution

Re: How to kill zombie process?


The pid you are trying to kill is probably being held open by a tcp connection. Use lsof to see which IP it is;

lsof -i | grep 10257

Iif you dont have lsof installed you can download from the HP software porting centre.

Then find out who the remote IP belongs to and get it rebooted, or if you are using HP-UX 11 you can use the ndd command to close the tcp connection, then your zombie will die.
Im from Palmerston North, New Zealand, but somehow ended up in London...
leereg_4
Advisor

Re: How to kill zombie process?

I use HP10.20
Always UNIX
Stefan Farrelly
Honored Contributor

Re: How to kill zombie process?


Have you got lsof downloaded and installed for 10.20 ?

You can still use lsof -i to identify who/what is stopping your zombie process from dying, but if it is a remote tcp connection you will need to reboot/break the network connection to get the zombie to die. On 11.0 you can kill it with the ndd command, but not on 10.20 im afraid.
Im from Palmerston North, New Zealand, but somehow ended up in London...
leereg_4
Advisor

Re: How to kill zombie process?

Thank you all for kindly replies!


All the best!
Always UNIX
Erik Tong
Advisor

Re: How to kill zombie process?

A zombie process is a child process that has terminated. What makes it a zombie is that the parent process has not called wait() or waitpid() to collect the termination status of the child process. The zombie process must hang around to keep the information for the parent process to collect.

I don't think "kill" will affect a zombie process, as it is already terminated.

So the only way to clean a zombie process is to kill the parent or if you are the programmer of these processes, make sure that the parent collects the termination status of its children.

Use "ps -ef" to determine the parent process of the zombie. The PID for the parent is the third column. I wouldn't just kill the parent. Killing it might do damage to your system. Determine what it is and the state of it first. It may be blocked on something else (a hung device). After that times out it might clean up the child process.