zombie

 
Thread Tools Search this Thread
Operating Systems Linux Red Hat zombie
# 1  
Old 07-24-2011
zombie

Hi,
Linux redhat 5.5

top shows that i have 20 zombie process :

Code:
Tasks: 357 total,   1 running, 336 sleeping,   0 stopped,  20 zombie
Cpu(s):  0.2%us,  0.3%sy,  0.0%ni, 99.5%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:  24949400k total,  2363052k used, 22586348k free,   227084k buffers
Swap: 16383992k total,        0k used, 16383992k free,   453804k cached

Its a 24*7 server and i cant take it down.
How can i "kill" those 20 zombies ?

Thanks

Last edited by pludi; 07-24-2011 at 05:48 PM..
# 2  
Old 07-24-2011
Zombie processes, sometimes called defunct processes, are processes that have completed, but their parent process has not yet received status of their termination. It's not unusual to see a few zombies for a few seconds if the parent process is busy and has not issued a wait() system call to collect the status of a child/children. However, if the zombies persist (their PIDs are always the same), this is an indication that the parent application is either poorly coded, or wedged (looping). Given that your CPU usage is low, I'm guessing the parent(s) aren't wedged.

Zombie processes cannot be killed, as you've likely found out. The good news is that the only system resources they are taking is the slot in the process table; all other real resources (memory, sockets, open files, etc.) were closed/released when the process ended. The zombies only become a problem when their numbers start to "clog" the process table which might have a finite size.

If you have the option to stop and restart the parent, then your zombie processes will be cleaned up with the parent. If the parent is some service that you must keep running in order to prevent down-time, then you're stuck.

If you want to see which process(es) own the zombies, capture the output of a ps -elf (or ps -ajx on FreeBSD) and look for the zombies. For each zombie the parent process id (PPID) should be listed (column 3 usually) and that can be used to find it's parent (look for the process with the PPID you found listed as the PID -- usually column 2).

This illustrates the output from the ps command showing the process a.out having a defunct/zombie child process:

Code:
0 S scooter  31578  4537  0  84   4 -   406 -      15:29 pts/3    00:00:00 a.out
1 Z scooter  31579 31578  0  84   4 -     0 exit   15:29 pts/3    00:00:00 [a.out] <defunct>

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Help with zombie processes

:)how do we list zombie processes in unix server??? :confused: (3 Replies)
Discussion started by: nikhil jain
3 Replies

2. Programming

Zombie in C

hello all, when we are creating a process by using fork, if the child process terminates before parent, the child process exists as zombie.. My doubt is when that child process terminates, how come that process exists further and show as a zombie process..can anyone help me to clear about this? (1 Reply)
Discussion started by: aarathy
1 Replies

3. UNIX for Advanced & Expert Users

Zombie process

What is the overhead associated with zombie process?Is it running out of process-ID?:confused: Since some information is stored in process table.. Thanks in Advance (4 Replies)
Discussion started by: jois
4 Replies

4. UNIX for Dummies Questions & Answers

what is zombie , how to kill it ,

Hello I try to googled it , but I dint get sufficient answer :( .. When I can see zombie running on server do they consume system resources or not ? I have read that is not good to kill them with signal 9 cause it might cause more troubles .. why is kill -9 so harmfull? thanks (2 Replies)
Discussion started by: kvok
2 Replies

5. AIX

zombie process

Is there an equivilant to the preap command in AIX that would allow me to get rid of a zombie process. I am new to AIX, moving over from Solaris and in the past I have been able to preap the pid on the defunct process to clean them up. I have looked around and the best I can see is that it may... (3 Replies)
Discussion started by: sboots
3 Replies

6. Solaris

zombie process

dear friends, in an interview they asked me what is zombie process. how we can identifying these process.if can you kill all zombie process. (8 Replies)
Discussion started by: sijocg
8 Replies

7. Shell Programming and Scripting

Zombie process

Hi I need help because I don't know if it is possible to add a find inside a cat. like I have a file with the pid of the process that use to became zombie. And I have the same pid stored in the var (pid1) now, I have no clue how to check if the the find finds the pid or even if it's... (2 Replies)
Discussion started by: ruben.rodrigues
2 Replies

8. Linux

zombie process

Hi What is the command to find only the zombie processes?? How to write the code in C to fetch the no. of zombie processes?? Thanx (5 Replies)
Discussion started by: jeenat
5 Replies

9. Programming

Daemon...Zombie?? Please help me

Hello, i am very very puzzled, im doing this project for school, its a deamon logger, but anyways I'm supposed to run the daemon, let it run on the backgroun, and then run a different program (from command like prompt). but when i run my daemon, it never goes back to the nova> prompt. :( i dont... (3 Replies)
Discussion started by: Kacyndra
3 Replies

10. Programming

Zombie Files on a HP-UX

How can you find a zombie file on the system. I have been in the database side of the system to search for Orphan files removed the orphan files, but still got the zombie file. When you run a top command it says there is a zombie process that is running i would like to find it. How can i do... (5 Replies)
Discussion started by: JackieRyan26
5 Replies
Login or Register to Ask a Question