How to clean zombie process under Linux __linux

Source: Internet
Author: User

Often found in the regular detection of the script kill, the process will be zombie inside, unable to clean. You can refer to the following method to clean up:

Processes that have the following environments:


#ps aux |grep monitorast.pl
Root 3962 0.0 1.5 5652 3840? Ss 10:13 0:00 /usr/bin/perl-w/root/script/monitorast.pl
Root 5135 0.0 0.2 3920 740 pts/0 s+ 10:52 0:00 grep monitorast.pl

# kill-9 process status after 3962:

# PS aux |grep monitorast.pl
Root 3962 0.0 0.0 0 0? Zs 10:13 0:00 [monitorast.pl] <defunct>
Root 5196 0.0 0.2 3916 668 pts/0 r+ 10:52 0:00 grep monitorast.pl

Then you cannot use kill to purge, then you need to clean up the process from the call to kill

#ps AXJF

1 2616 2616 2616? -1 Ss 0 0:00 Crond
2616 3960 2616 2616? -1 S 0 0:00/_ Crond
3960 3962 3962 3962? -1 Zs 0 0:00/_ [monitorast.pl] <defunct>
3960 3970 2616 2616? -1 S 0:00/_/usr/sbin/sendmail-fcrondaemon-i-odi-oem-oi-t

Judging by this, the calling process does not affect other tasks on the system, so you can kill the parent process directly.

# kill-9 3960

# PS aux |grep monitorast.pl
Root 5364 0.0 0.2 3916 676 pts/0 r+ 10:58 0:00 grep monitorast.pl

Now you can see that it's not there anymore.

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.