1827293 Members
2424 Online
109717 Solutions
New Discussion

Re: process zombie

 
Manuel_5
Advisor

process zombie

Hi to all,
As I kill processes zombie?


Manuel,
Manuel Parra
7 REPLIES 7
Steven E. Protter
Exalted Contributor

Re: process zombie

kill -9 PID

PID is process id

If that does not work, then reboot the box.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
twang
Honored Contributor

Re: process zombie

Hi Manuel,

It seems that you need to reboot your system to remove those processes zombie, but if you cannot reboot it now, it should not cause you too much trouble until downtime can be arranged.

best regards
twang
Mark Grant
Honored Contributor

Re: process zombie

A zombie process is a process that has finished execution but whose parent has not issued a "wait()"

The zombie process will go away as soon as the parent process does the "wait()". If they are staying around for a while, then you have an application that is not behaving properly and you should try and investigate which one it is.

It is worth pointing out that unless you get lots and lots of these, they aren't taking up resources.
Never preceed any demonstration with anything more predictive than "watch this"
Yu Wang_1
New Member

Re: process zombie

No. You don't have to reboot your box for getting rid of the zombies. Here are steps:

-get pid of the zombie (defunc);
-then ps -elf|grep pid. This will show parent and/or child(ren) process of the zombie.

-if the zombie's parent process is 1 (init), there must be at least one child process belongs to this zombie. From above ps command, you will see the pid of the child process.
Use kill -9 childpid. Then the zombie would go away.

-if the zombie's parent process is not 1, then you need use ps to grep the parent process. If there are no more other child processes running under the parent process, use kill -9 parentpid. then the zombie would go away. But if the parent has other child running, you might want to be careful in that killing parent may terminate those child processes as well.

I came out this method and use it in my system frequently and it works just perfect.

Hope this helps.
Stuart Browne
Honored Contributor

Re: process zombie

Whilst what Yu mentioned are good steps for clean-up, it won't necessarily fix things.

If it is a true zombie process who's parent has died (as Mark talked about), then you won't be able to kill it, and as Steven and Twang said, a reboot will be required.

If a process has gone truely gone zombie, there is nothing you can do.
One long-haired git at your service...
Glen Trevino
Advisor

Re: process zombie

 
Andrew Bruce
Valued Contributor

Re: process zombie

So, to sum up ;-)

A you cannot kill a zombie as it is already dead. That is why it is called a zombie!

The zombie hangs around *purely* as an entry in your process table. This is so that it can report its exit code, CPU time, and a few other stats back to the parent process that initiated it.

If the parent process has died off without wait()ing for the exit status, etc., then the zombie may well be orphaned and cannot be removed by any means other than a reboot.

However, as I said earlier, it is only taking up one slot in your process table - it doesn't consume memory, or CPU (pre se), so the only side effect of a zombie process lingering is that, if you find processes spawning a large number of zombies, you will eventually run out of process space and your computer will fall over.

Zombies are generally the result of poorly written software.

Hope this helps (HTH).

B.

ps A quick search on google would have answered this and more, more quickly! ;-)
I Love it when a plan comes together!