How to view and kill botnets in CentOS

Source: Internet
Author: User

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!


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.