How to Kill Zombie Process


 
Thread Tools Search this Thread
Operating Systems Solaris How to Kill Zombie Process
# 1  
Old 05-06-2010
How to Kill Zombie Process

Dear Bos,

I have one server,everday if I check with command TOP always present zombie,like below:


Code:
last pid:  4578;  load averages:  0.15,  0.11,  0.13                                                                                                07:56:15
298 processes: 295 sleeping, 1 running, 2 zombie, 1 on cpu
CPU states:     % idle,     % user,     % kernel,     % iowait,     % swap
Memory: 8192M real, 2465M free, 7700M swap in use, 2541M swap free


how to kill zombie process?thank for your help.


warm regards

Fredginting

Last edited by Scott; 05-07-2010 at 06:33 PM.. Reason: Code tags, please...
# 2  
Old 05-06-2010
Technically you cannot kill zombies - they are already dead.

Either reboot the system, kill the parent process or restart the particular service.
# 3  
Old 05-07-2010
check out preap. this does not always work. may need to try and kill -9 it.
# 4  
Old 05-07-2010
MySQL

You can let try..

Code:
for i in `ps -lLef | grep defunct |grep -v grep | awk '{print $4}'`
               do 
                 echo "Killiing Process..pidno= $i" ; sleep 1 
                  kill -9 $i ; sleep 5; 
               done

# 5  
Old 05-07-2010
Quote:
Originally Posted by ygemici
You can let try..

Code:
...kill -9 $i

This is pointless. A defunct process as its names implies is dead. Being dead, it cannot be killed "more", even with "-9". Also, a dead process uses no resources (RAM, CPU, I/O ...) so isn't really an issue per se , unless there are thousands or more, by polluting ps output and filling the process table.
The fact there are defunct processes is however exhibiting a bug or anomaly with their parent processes.
This User Gave Thanks to jlliagre For This Post:
# 6  
Old 05-07-2010
I'm curious what the zombie is, or was.
# 7  
Old 05-08-2010
MySQL

Quote:
Originally Posted by jlliagre
This is pointless. A defunct process as its names implies is dead. Being dead, it cannot be killed "more", even with "-9". Also, a dead process uses no resources (RAM, CPU, I/O ...) so isn't really an issue per se , unless there are thousands or more, by polluting ps output and filling the process table.
The fact there are defunct processes is however exhibiting a bug or anomaly with their parent processes.
Hi jlliagre
fredginting wants to kill zombie process.I show the way of how do it just probably..
Zombie process already inactive but it remains to stay in ps table..
In this way parent can read exit status of its chid process(so zombie process)..
Zombie process has not been waited for its parent process..
Maybe if it waits to its parent process then parent process send wait() call to system for its zombie and system is kill the its zombie..
on this state kill -9 does not guarantee to kill a zombie process never.
If completely kill it firstly kill the parent process which has the zombie process..
In my opinion zombie can stay here baceuse has any damage to me Smilie

thanks for sharing your informations Smilie
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. 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

5. 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

6. Linux

How to kill zombie process

I have RHES4 machine with VRTSralus - Backup Exec agent installed there and running as a service. The agent hiccups sometimes and turns into defunct state. The problem is that I cannot kill it anyway., it stays there forever until the machine is rebooted. I wonder if anyone had such an experience... (1 Reply)
Discussion started by: will_mike
1 Replies

7. 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

8. UNIX for Advanced & Expert Users

zombie daemon process!!

My daemon process is the child of init and init has the responsibility to remove it, once it turns zombie. But I want to ask why the daemon process which is child of init turns zombie in the first place. What measures I have to take to avoid this? rish (1 Reply)
Discussion started by: rish2005
1 Replies

9. UNIX for Advanced & Expert Users

Zombie process

I would like to create a zombie process so that I can test monitoring software functionality. Any techniques? (2 Replies)
Discussion started by: swhitney
2 Replies

10. UNIX for Dummies Questions & Answers

Zombie process

How do i kill a zombie process. Is it that only root can kill a zombie process. (8 Replies)
Discussion started by: orca
8 Replies
Login or Register to Ask a Question