Solution to a large number of zombie processes on Linux servers
How do I view zombie processes in Linux and how many zombie processes are counted?
# Ps-ef | grep defunct
Or find a process in the Z state. Z indicates zombie process, which means a zombie process.
In addition, when you use the top command to view the result, the column is S. If the status is Z, it indicates that it is a zombie process.
Tasks: 95 total, 1 running, 94 sleeping, 0 stopped, 1617 zombie
The top command also counts zombie processes. Or use the following command:
Ps-ef | grep defunct | grep-v grep | wc-l
How to kill botnets?
Generally, zombie processes are difficult to kill directly, but you can kill zombie fathers. After the death of the parent process, the zombie process becomes an "orphan process". After the first process is passed to init, init will always be responsible for cleaning up the zombie process. All the zombie processes generated by the parent process will also disappear.
Ps-e-o ppid, stat | grep Z | cut-d "-f2 | xargs kill-9
Linux botnets
Ubuntu finds and kills zombie Processes
Botnets in Linux
Zombie processes in Linux
Processing of zombie processes in Linux
This article permanently updates the link address: