Killing a zombie process[PRD]


 
Thread Tools Search this Thread
Operating Systems Solaris Killing a zombie process[PRD]
# 1  
Old 06-21-2011
Killing a zombie process[PRD]

Dear All,

I have checked so many post about killing Zombie process.

Most of the cases, everyone suggested to "reboot" the system, as "kill -9/-15 zombie" may not work!

My concern is:
If the system is a Production server then what to do?[you can't reboot the system!]

Regards,
Sapy.
# 2  
Old 06-21-2011
"kill -9/-15" won't work. There is actually no point in trying to kill a zombie process as it is already "dead" anyway.
This User Gave Thanks to jlliagre For This Post:
# 3  
Old 06-21-2011
So what do you sugest then, as it is a Production Server!
# 4  
Old 06-21-2011
Code:
preap PID

will do the trick.
These 2 Users Gave Thanks to tamitot For This Post:
# 5  
Old 06-21-2011
As jlliagre mentioned, zombies are already dead. They consume no resources aside from their entry in the process table. Whatever memory they were using has been returned to the system. Whatever descriptors they held open have been closed. Etcetera.

A zombie occurs when a process does not collect the exit information of a child. If you are seeing a lot of zombies, then you have a poorly coded program running on your system. If you kill this program (the parent of the zombies), the zombies will be adopted by init (PID 1) and it will take care of them.

So, a less drastic workaround than rebooting the system would be to restart the application that created those zombies. I don't use solaris, but from what I just read, preap as suggested tamitot allows you to avoid a restart of even a single process. Best solution of course is to fix the program which spawned the zombies in the first place (although I realize that sometimes this is not possible).

Regards,
Alister
This User Gave Thanks to alister For This Post:
# 6  
Old 06-22-2011
This User Gave Thanks to hard_revenge For This Post:
# 7  
Old 06-23-2011
Thanks Alister and Tamitot for clearing my doubt. I will definitely try to fix those program which created the zombies in next CR.

Thank you hard_Revenge for that link. The link is really good, it shows how the 'preap' command works [with example! Smilie]
This User Gave Thanks to saps19 For This Post:
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. Shell Programming and Scripting

Finding the age of a unix process, killing old processes, killing zombie processes

I had issues with processes locking up. This script checks for processes and kills them if they are older than a certain time. Its uses some functions you'll need to define or remove, like slog() which I use for logging, and is_running() which checks if this script is already running so you can... (0 Replies)
Discussion started by: sukerman
0 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. Red Hat

killing zombie threads

I have an app server running on Redhat 4.0. There are about 30 processes spawned (all by the same user). When the DB goes down before the app server, it leaves them all running, but they're zombies. The app utility can't shut them down even when the DB comes back up. I've killed them from the... (2 Replies)
Discussion started by: abNORMal
2 Replies

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

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. Shell Programming and Scripting

Killing of a process and send a mail if the process doesnot come up within 2 minutes

Hi Friends, I am new to this forum as well as new to shell scripting. I have a problem here and i need someone to solve this. Let us consider there are two processes(abc & def).There is a script which kills these two processes(i.e killtheprocess abc). Here abc is the argument . There is a... (1 Reply)
Discussion started by: Prince89
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