Visit Our UNIX and Linux User Community


Zombie Files on a HP-UX


 
Thread Tools Search this Thread
Top Forums Programming Zombie Files on a HP-UX
# 1  
Old 12-20-2001
Question 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 that?

Thanks
# 2  
Old 12-20-2001
A zombie process is created when a parent process dies without cleaning up its children properly. AFAIK there is nothing you can do to clean them up after the fact except reboot. They generally dont cause any harm though. If you are seeing many zombies you should investigate which program is causing them and fix the problem.
# 3  
Old 12-20-2001
Thank you that is what i thought but was not too sure and i am not going to kill it since it is my complete database that caused this zombie process.

Thanks
# 4  
Old 12-20-2001
About zombie processes, I have several opinion.

1) The cause lead to generation of zombie is, when the child processes stop (as you know, a signal of SIGCHLD will be sent to the father process), normally the father should do something with the signal SIGCHLD with the system call wait() or waitpid(). But if the father process encounters a logical error in his internal procedure. certainly the signal SIGCHLD is blocked. so the father can not release the resource occupied by his child processes. you can run 'ps -ef|grep defunct' to search all the zombies.

2) To solve this problem. you can kill the father process of all the dufunct processes. the initial process 'init' will release all the zombies automaticlly.

Another thing, I am from China. So my english language may be not good enough to interpret all your doubtness! Thank you!
# 5  
Old 12-21-2001
I basicly agree with WayneYang. Every time you see a zombie on ps, look at the ppid field to find the parent program that is ignoring the death of its children. That program really has a bug and it should be fixed. And if you kill that parent, init will inherit the zombies and reap them.

But there is nothing wrong with ignoring SIGCHLD. Lots of well behaved programs simply issue the wait() call at the proper time.
# 6  
Old 01-15-2002
try this:

while ((ret = waitpid((pid_t)-1, &status, WNOHANG)) != 0) {
printf("ret : %d", ret);
}

put this in your main loop and it will remove all defunct processes.

Previous Thread | Next Thread
Test Your Knowledge in Computers #889
Difficulty: Easy
In sed, the REGEX caret (^) matches the end of the line.
True or False?

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

9. UNIX for Dummies Questions & Answers

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... (8 Replies)
Discussion started by: merlin
8 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

Featured Tech Videos