Sonntag, 24. August 2008

Search and destroy zombies

Apart from being able to see that there are zombies on a system, using the top command, you want to be able to kill zem all. I was wondering if there was a quick way of doing this and happened 'pon a post on the subject on linux forums. This command should search 'em:
/bin/ps ax -eostate,pid,ppid --sort=state 2>/dev/null | grep ^Z

In my case this turned up two processes. One was a shared library which seemed to have run amuck and the other was firefox. You don't want that a fat zombie hog running about your system, so a quick kill -9 fried firefox and the shared library in one fell swoop. Not bad. There are probably twenty thousand ways of kicking zombie ass, but this WORKSFORME.