How to Kill a Zombie Process

Zombies present a particularly unique problem to system administrators. No, I do not mean the type of zombies that eat brains. I mean zombie processes. A zombie process is a process that is no longer active on a system but that refuses to die. In most cases, a zombie is not something that should alarm you, and some may even go away on their own.

If enough zombie processes appear, you may want to do something about them to get them off of your process table. Unfortunately, you cannot actually kill a zombie, as anyone who watches zombies movies would know. You can, however, attempt to make it go away.

First, to find zombies, use this command string:

ps aux | awk ‘{ print $8 ” ” $2 }’ | grep -w Z

The output will look like this:

Z 38012

Z 47290

Z 13845

You can use these PIDs and attempt to kill them using the traditional method:

kill -9 47290

There is a good chance, however, that this attempt will not work since zombies cannot be killed, as we have already stated. Since a zombie is essentially a defunct child process, there are three options: fix the parent process (make it wait), kill the parent (probably not a good idea), or live with it. Unlike the brain-eating zombies, this one typically will not do any damage, so the last option may be the most logical.











Comments: