So i did some research on the site but previous posts answered most of my questions about zombie processes but I have one question that didnt seem to get addressed
"how do you find the parent or parent ID of a zombie process so you can kill it?"
I know p -kill doesnt always just work on the zombie process so how would you find the associated parent so you can just kill the parent process and all associated zombie processes?
---------- Post updated at 07:33 PM ---------- Previous update was at 05:52 PM ----------
Nevermind, I found the answer
Heres how you would find the parent associated with the zombie
1.Do ps-aux first and look for the letter "z" in the stat column
2. Obtain the PID of the zombie
3. Do this command to find the parent ID that relates to the zombie and then kill it:
# ps aux -eo ppid| grep <Zombie Process ID>
# kill -9 <PPID>
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)
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)
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)
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)
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)
Dear Bos,
I have one server,everday if I check with command TOP always present zombie,like below:
last pid: 4578; load averages: 0.15, 0.11, 0.13 07:56:15
298 processes: 295 sleeping, 1... (10 Replies)
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
LEARN ABOUT LINUX
preap
preap(1) User Commands preap(1)NAME
preap - force a defunct process to be reaped by its parent
SYNOPSIS
preap [-F] pid...
DESCRIPTION
A defunct (or zombie) process is one whose exit status has yet to be reaped by its parent. The exit status is reaped via the wait(3C),
waitid(2), or waitpid(3C) system call. In the normal course of system operation, zombies may occur, but are typically short-lived. This may
happen if a parent exits without having reaped the exit status of some or all of its children. In that case, those children are reparented
to PID 1. See init(1M), which periodically reaps such processes.
An irresponsible parent process may not exit for a very long time and thus leave zombies on the system. Since the operating system destroys
nearly all components of a process before it becomes defunct, such defunct processes do not normally impact system operation. However, they
do consume a small amount of system memory.
preap forces the parent of the process specified by pid to waitid(3C) for pid, if pid represents a defunct process.
preap will attempt to prevent the administrator from unwisely reaping a child process which might soon be reaped by the parent, if:
o The process is a child of init(1M).
o The parent process is stopped and might wait on the child when it is again allowed to run.
o The process has been defunct for less than one minute.
OPTIONS
The following option is supported:
-F Forces the parent to reap the child, overriding safety checks.
OPERANDS
The following operand is supported:
pid Process ID list.
EXIT STATUS
The following exit values are returned by preap, which prints the exit status of each target process reaped:
0 Successfully operation.
non-zero Failure, such as no such process, permission denied, or invalid option.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWesu (32-bit) |
+-----------------------------+-----------------------------+
| |SUNWesxu (64-bit) |
+-----------------------------+-----------------------------+
SEE ALSO proc(1), init(1M), waitid(2), wait(3C), waitpid(3C), proc(4), attributes(5)WARNINGS
preap should be applied sparingly and only in situations in which the administrator or developer has confirmed that defunct processes will
not be reaped by the parent process. Otherwise, applying preap may damage the parent process in unpredictable ways.
SunOS 5.10 26 Mar 2001 preap(1)