zombie program


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers zombie program
# 1  
Old 11-06-2002
zombie program

When you run a ps -ef and if the status is a Z (zombie) does that mean the same as not responding? (Like a windows machine).

Also has anyone here heard of the program called 'top' (I've found it on our Solaris 7 machines) If you have you might be able to help me. I need to know if there is a way to test the status of a machine or program from the top command.


Might help if I explian what I'm trying to do.

I need to write a script/program to detect when a program isn't running and then restart that program. BUT sometimes it's not the program that is responding it can sometimes be the network port and just gone in a zombie mode and it's detected and all but wont receive info or send any through that port. I need to be able to detect that as well and reset that port if that is the problem.

If anyone has any idea's how this can be done or help with the above. Thanks so much if you can help Smilie
merlin
# 2  
Old 11-06-2002
A zombie is a program that has completely exited. It is waiting for it's parent process to issue a wait() system call. When you see a zombie in "ps", look at the ppid field. That is the pid of the parent. If you kill the parent, the zombies will become inherited by init which will notice and issue that wait() call. This makes the zombies go away. You really should track down the author of that parent process. This is a bug and it should be fixed. Programs that launch child processes need to be ready for the death of a child.

My knowledge of windows is very weak, but I think a "not responding" program is more like a unix program that is ignoring as many signals as possible. If you do a "kill $pid" on it, it won't go away. You need to do a "kill -9 $pid" on it to get rid of it.

A port cannot be a zombie, so I don't know what you have in mind there.
# 3  
Old 11-07-2002
If the child is not responding to the parent you can issue the -18 SIGCHILD to tell the parent to go out and kill all its children Smilie

Of course if you don't have the PID of the parent you can't do this. If the child has been handed off to init and the PPID is (1) then you can't get rid of them until your next reboot.
# 4  
Old 11-11-2002
a zombie process can be identifed when u do a ps and then u see a Z, and that process is a zombie?

thanks
yls177
# 5  
Old 11-12-2002
Right, state Z means zombie.
# 6  
Old 11-12-2002
FWIW: On many UNIX and Linux systems zombies will not go away with a kill signal (or even kill -9) and the only way to clear them off the process table is to reboot.
# 7  
Old 11-12-2002
Thanks for the help on how to find a zombie program. But what I really need is to find out if/when a program is no longer responding to the system so then it can be reset automatically.

Is there a way to find out about a none responding program?
merlin
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

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

2. Red Hat

zombie

Hi, Linux redhat 5.5 top shows that i have 20 zombie process : 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... (1 Reply)
Discussion started by: yoavbe
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. 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. Programming

zombie to exist after the termination of main program..

main() { pid_t child; child=fork(); if(child > 0) {sleep(60); } else {exit(0); } } the above code will create zombie process,which will be adopted by init as soon as parent process will dies.Can any one gimme a code or an alogrithm to keep this zombie proocess alive even after... (6 Replies)
Discussion started by: anilchowdhury
6 Replies

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

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