I was looking for the right way to find the PID of zombie process for quite a long time. Unfortunately most of the good advices found on the net (mostly on different distro’s forums) were not working.

So – I was really glad to come across this article:

Peanut Linux

yesterday. There is a lot more tips there than just finding “zombie”. Take a look!

But for folk in a hurry, here is the quote from the article:

“If you have any ‘zombie’ processes, do this to remove them.

~# ps x
koo

~# pstree -p
foo(346)-+-boo(350)—koo(357)

~# kill -9 350

You don’t have to go all the way back unless you want to,
just kill the parent of the zombie process, not the parent
of the parent.”

Now – few tips from tami (for the beginners like me ;):

-the lines after [~#] you are to type in the terminal/console

– the output of the first command (ps -x) will give you the pid of “zombie”

– the output of the second command will show you “the tree” of processes where you can find “the parent” of your “zombie” – the clue is to kill the parent…Sounds awful, doesn’t it? ;)…LOL But this is the true! “The parent” is the process which is higher in the tree…

Now to something really important – if you do not know exactly what “parent” is responsible for… or as it was in my case – the parent was window manager…lol – the best way is to logout or – even to reboot…instead of killing process…at least according to my little knowledge 🙂

Anyway – afterwards you can take a closer look at “the parent” – usually something is wrong with the process, fi. it can be a mistake in configuration file…

Happy hunting,

tami 😀

Advertisements