Kill the zombie children

I had an interesting thing happen and learned something new while fixing it. If I want to kill a process from command line I would normally do a "kill -SIGKILL 32567" after doing a "ps -A" and seeing the process ID number. I did a "man kill" and noticed that options can be the signal number and I had some zombie processes that needed killing and wouldn't die. So I tried "kill -9 32567" and that is the same as using "-SIGKILL". It doesn't kill zombies however. In order to kill the zombies you have to kill the parent. A zombie process is indicated by <defunct> along side the PID and name. So I did a "pstree" and it showed who owned my zombies. While reading about "kill", I read about "pkill" which allows removal of a thread by name. In this case I had a zombie "totem" which had "zim" as its parent. So I tried "pkill zim" and so it was done, zombies and the zombie keeper were vanquished. Sounds like killing vampires. You have to kill the head vampire or it keeps the other vampires alive. The really odd thing is that zombie process doesn't get any CPU time, but it can have its own sub process that lives on without any change. Like a ghost of a zombie. So it is the ghost of the undead zombie process that lives like an echo of being so long as the machine is on. It just happens.

So that makes life easier as it is less typing and also I had wondered why I had defunct process elements on several occasions.

0 comments:

Contributors

Automated Intelligence

Automated Intelligence
Auftrag der unendlichen LOL katzen