Linux system search and kill zombie process

Source: Internet
Author: User

Linux On the server , there are some zombie processes that show how to quickly find and destroy these zombie processes

First, we can use the top command to see if the server currently has a zombie process, in which you can see the number of zombie process hints, if the number is greater than 0, it means that the server currently exists a zombie process

650) this.width=650; "alt=" qq20130725122857.jpg "border=" 0 "src=" http://www.linuxde.net/wp-content/uploads/2013/07 /112000mvr.jpg "title=" Click to see the original "style=" Padding:0px;margin:0px;border:0px;height:auto; "/>

Below, we use the PS and grep commands to find the zombie process

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

Command annotations:

-A parameter lists all processes

-O Custom output fields We set the Display field to stat (status), Ppid (process parent ID), PID (process id), cmd (command) four parameters

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

The operating results are as follows

Z 12334 12339/path/cmd

At this point, we can use it kill -HUP 12339 to kill the zombie process.

After running, you can run it again ps -A -ostat,ppid,pid,cmd | grep -e ‘^[Zz]‘ to confirm that the zombie process is killed

If the kill child process is not valid, you can try to kill its parent process to resolve the problem, such as the parent process PID is 12334, then we run

Kill-hup 12334


This article is from the "XFICC" blog, make sure to keep this source http://xficc.blog.51cto.com/1189288/1585481

Linux system search and kill zombie process

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.