How Linux kills Zombie processes

Source: Internet
Author: User


Problem Description:

Shell >Toptop- One: -: -Up630Days +: at,1User, load Average:0.23,0.81,1.07Tasks:389Total1Running385Sleeping,0Stopped3Zombiecpu (s):3.6%us,0.8%sy,0.0%ni,95.3%ID,0.0%wa,0.0%hi,0.3%si,0.0%stmem:24596748k Total, 3346824k used, 21249924k Free, 50344k buffersswap:8388600k Total, 9704k used, 8378896k Free, 1649016k Cached

# found There are three zombie processes 3 Zombie, this is because the parent process first killed the resulting

Shell >PSAux |grepZuser PID%cpu%MEM VSZ RSS TTY STAT START time Commandroot7811  0.0  0.0      0     0? Zs One: the   0:xx[Yiic_elastic_kt] <defunct>Root8446  0.0  0.0 103260   872pts/1r+ One: -   0:xx grepZ

# no face, it's been dead two, it's probably the sun.

Kill -97811

# This is not dead, but also tenacious survival

Workaround:

Shell >PS-ef |grepDefunctroot8850  8840  0  One: -?xx:xx:xx[Yiic_elastic_kt] <defunct>Root8851  8842  0  One: -?xx:xx:xx[Yiic_elastic_kt] <defunct>Root8853  8843  0  One: -?xx:xx:xx[Yiic_elastic_kt] <defunct>Root8855  8839  0  One: -?xx:xx:xx[Yiic_elastic_kt] <defunct>Root9066  7621  0  One: -pts/1    xx:xx:xx grepDefunct

# I went and ran out of three ...

PS grep awk ' {print $} ' Xargs Kill {}

# $ $ is the parent process of these zombie processes PID (PPID), kill it!

PS grep defunctroot      10008  7621  0 One: pts/1: xx: The    grep defunct

# It's gone!

How Linux kills Zombie processes

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.