The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Trying to kill a program via help command. TiznaraN Shell Programming and Scripting 5 04-22-2008 09:57 AM
Kill Command sonali UNIX for Dummies Questions & Answers 4 01-02-2007 11:30 PM
the kill command kelogs1347 High Level Programming 2 11-23-2006 12:23 AM
Kill a debug command AJA UNIX for Dummies Questions & Answers 3 03-01-2004 08:59 AM
kill command Rush UNIX for Dummies Questions & Answers 1 03-27-2003 12:54 PM

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-11-2006
Registered User
 

Join Date: Aug 2005
Posts: 229
Is there anu command or way to kill zombis?

I have some zombie's in my env , i have no idea from where they created
but how can i kill them ?
How can i know what is the source of the zombie process?
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 05-11-2006
Registered User
 

Join Date: Mar 2006
Posts: 106
Here..

In UNIX every parent process is responsible for cleaning up after his child processes. As when process is done, its parent process removes it from the system properly and clean its data structure. Sometimes parent process is getting killed or terminated before his child process ends. In such case child process has to be terminated by INIT process. Unfortunately it not always does it clean or perfect.
Zombie processes aren't the real, because there's is no "process" in the execution queue and only some data structure still persist. If they are few just disregard them, as zombi is a normal phase (undesirable but normal) of process's lifetime. If there are many, the only real way to get rid of them is to reboot the system The command "kill", even with -9 wouldn't help as process had been eliminated already.
Get "UNIX Essentials and UNIX Core" DVD as it explains stuff like that.

Hope it helps.
Reply With Quote
  #3 (permalink)  
Old 05-11-2006
blowtorch's Avatar
Supporter
 
Join Date: Dec 2004
Location: Singapore
Posts: 2,323
To clean up zombies, use the following procedure:
1. Run 'ps -ef|grep defun' to search for defunct processes
2. Check the parent process for the zombies
3. See if the parent can be killed. If it can be, kill it.
Once you kill the parent, then all its children (zombie) processes will be inherited by init. Init will immediately wait for all the pending children and that will be the end of the zombie processes.

Note that if you have several different parent processes that have zombie children, you have to kill all those processes.
Reply With Quote
  #4 (permalink)  
Old 05-20-2006
Registered User
 

Join Date: Aug 2005
Posts: 229
Hello and tnx for the fast reply
i have question , how can i find out who is the defunct parent process ?
say if i got :
mydir 28138 9186 0 1:51 <defunct>
after runing 'ps -ef|grep defun'

tnx
Reply With Quote
  #5 (permalink)  
Old 05-21-2006
tayyabq8's Avatar
UNIX Hobbyist
 

Join Date: Nov 2004
Location: /World/Asia/MiddleEast/Kuwait/Salmiya
Posts: 513
in your case:

Quote:
mydir 28138 9186 0 1:51 <defunct>
9186 is the Parent PID(PPID), to display parent process and all its child processes you could do:
Quote:
ps -ef | grep 9186
replace 9186 with your PPID. Hope it helps!
Reply With Quote
Google UNIX.COM
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 08:33 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0