Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Technical

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 25th November 2005, 11:49
Ovidiu Ovidiu is offline
Senior Member
 
Join Date: Sep 2005
Posts: 1,262
Thanks: 78
Thanked 24 Times in 20 Posts
Question what to do about zombie processes ?

top shows I have 2 of them,
what can I do to detect and kill them?
Reply With Quote
Sponsored Links
  #2  
Old 4th December 2005, 20:43
themachine themachine is offline
Senior Member
 
Join Date: Oct 2005
Location: Texas, USA
Posts: 109
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by Tenaka
top shows I have 2 of them,
what can I do to detect and kill them?

If you are looking at top, the first column is the PID (Process ID). Quit out of top, and then you can execute the command:

# kill <PID>

The default kill signal is SIGTERM (15) which will attempt to kill the process cleanly. If it still failes to die off you can issue a SIGKILL(9) to trash the process and really kill it (uncleanly).

# kill -9 <PID>
__________________
themachine
5dollarwhitebox.org
Reply With Quote
  #3  
Old 4th December 2005, 22:51
Ovidiu Ovidiu is offline
Senior Member
 
Join Date: Sep 2005
Posts: 1,262
Thanks: 78
Thanked 24 Times in 20 Posts
Default

I did not phrase my question good enough: top tells me I have 1 zombie process, I know how to kill it but how do I know which process is the zombie one?
Reply With Quote
  #4  
Old 5th December 2005, 02:20
themachine themachine is offline
Senior Member
 
Join Date: Oct 2005
Location: Texas, USA
Posts: 109
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by Tenaka
I did not phrase my question good enough: top tells me I have 1 zombie process, I know how to kill it but how do I know which process is the zombie one?
Who is the user running the zombie process? You can also look at:

# ps -auwx | grep <pid>

and perhaps you'll get more info from that output.
__________________
themachine
5dollarwhitebox.org
Reply With Quote
  #5  
Old 5th December 2005, 10:05
Ovidiu Ovidiu is offline
Senior Member
 
Join Date: Sep 2005
Posts: 1,262
Thanks: 78
Thanked 24 Times in 20 Posts
Default

still you did not get my question:

tu run: # ps -auwx | grep <pid>

I need to know the pid of the zombie process but all I know is that when I open top I see in the report on top: 1 zombie process I do not know which one is the zombie process, so I can't know its Pid :-)
Reply With Quote
  #6  
Old 6th December 2005, 06:55
themachine themachine is offline
Senior Member
 
Join Date: Oct 2005
Location: Texas, USA
Posts: 109
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I see now... why not try:

# ps auxw | grep -i "zombie"


Maybe that will do?
__________________
themachine
5dollarwhitebox.org
Reply With Quote
  #7  
Old 7th December 2005, 15:59
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
Default

Sometimes zombie processes have the string <defunct> at the end in the output of top. Maybe that helps.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #8  
Old 16th December 2005, 19:51
webstergd webstergd is offline
Member
 
Join Date: Dec 2005
Location: Washington, DC
Posts: 53
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Are you refering to a zombie process as a process or thread that has reached deadlock. ie no longer responding? If this is the case then their is no easy way to tell which process is causing the problem. Mostly it is trial and error. This is also extreamly dangerious to do. If you have a production environment and need a way to recover from deadlock there are a few solutions out available. Only problem is that deadlock solutions provide an a extreamly large amount of over head.

Thus, solution is:
personal or development comptuer - restart. If you need to track it you can also check your error logs

development server - look into deadlock software solutions.
Reply With Quote
  #9  
Old 16th May 2007, 01:04
nlsteffens nlsteffens is offline
Junior Member
 
Join Date: May 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default displaying zombie processes

Use this command to display all of your zombie processes:

ps aux | awk '{ print $8 " " $2 }' | grep -w Z
Reply With Quote
  #10  
Old 6th September 2007, 22:59
Hans Hans is offline
Moderator
 
Join Date: Dec 2005
Location: Montfoort, The Netherlands
Posts: 2,256
Thanks: 212
Thanked 648 Times in 294 Posts
 
Default Displaying Zombie processes

Have a look here to sse how to display zombies: http://www.debian-administration.org/articles/261
But killing them is not possible as the zombies are dead already.
__________________
Hans

MrHostman | Master in managed hosting

Last edited by Hans; 6th September 2007 at 23:07.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with instalation indicator72 Installation/Configuration 38 16th November 2005 11:39


All times are GMT +2. The time now is 13:31.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.