How to view and kill the zombie process under CentOS

Source: Internet
Author: User
Ps-a-O Stat,ppid,pid,cmd | Grep-e ' ^[zz] '
 
How to view and kill the zombie process under CentOS 

Yesterday, the server expired, before the server due to small space, can not meet the current service requirements, the new purchase of a server, is currently debugging installation.

During the debugging process, there are many zombie processes found in the system, and now it's time to find these zombies and kill them.

View zombie processes in the system with top

And see what these zombies are programmed to do.

Ps-a-O Stat,ppid,pid,cmd | Grep-e ' ^[zz] '

Because the process of a state of Z or Z is a zombie process, we use grep to crawl the stat state for the ZZ process

The results of the operation refer to the following

There are 6 zombie processes here, we need to kill them all, execute the following command

Kill-9 16092

It's a little slow to handle, just a quick command to kill all the zombie processes.

Ps-a-O Stat,ppid,pid,cmd | Grep-e ' ^[zz] ' | awk ' {print $} ' | Xargs kill-9

Look again, the zombie process is gone.


Original address: http://www.bkjia.com/Linuxjc/906801.html

Related Article

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.