Zombie processes on Linux

Each program that runs in Linux is the system process that has its own identifier. Each process may start child processes using the fork function. Such processes remain under the control of the parent process and cannot be completed without his knowledge. If one of these child processes are ended, and the parent process was unable to obtain this information, this child process becomes a zombie.

Zombie processes in Linux do not run and can not kill them, even with a sigkill, they continue to hang in memory until their parent process.

To see such processes by using utilities ps, here they are marked as defunct:

ps aux | grep defunct

If you try to kill a process using the KILL signal, nothing will come of it:

To conclude, you need to find “parent” of this process. To do this, use the command:

ps-xal | grep defunct

Here the ID of the parent process is in the fourth column (PPID). Now we can send him a termination signal, and such a process in the system will no longer:

kill-KILL 3990

For convenience, you can use utilities top or htop, but the principle of their action will be similar, so I won’t be here to consider it. Now you know what to do if your system has a zombie process.

Source: losst.ru

(Visited 4 times, 1 visits today)