Solution to a large number of zombie processes on Linux servers

Source: Internet
Author: User

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:

 

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.