How to view and kill botnets in CentOS
The server expired yesterday. Because the previous server had a small space and could not meet the current service requirements, a new server was purchased and is currently being debugged and installed!
During the debugging process, we found that there were many zombie processes in the system. Now we are trying to find these zombie processes and kill them.
Use top to view botnets IN THE SYSTEM
Let's take a look at the zombie program.
Ps-A-o stat, ppid, pid, cmd | grep-e '^ [Zz]'
Because the process in the z or Z status is a zombie process, we use grep to capture the stat status as zZ process.
The running result is as follows:
There are a total of six zombie processes here. We need to kill them one by one and execute the following command
Kill-9 16092
The processing speed is a little slow. You can directly run a command to quickly kill all zombie processes.
Ps-A-o stat, ppid, pid, cmd | grep-e '^ [Zz]' | awk '{print $2}' | xargs kill-9
Check again. The zombie process is gone!