What is a zombie process?

by
Share this Article: Facebook0Google+0Twitter1LinkedIn0Reddit0StumbleUpon0

Question : What is a zombie process?

Answer : When a process finishes execution, it will have an exit status to report to its parent process. Because of this last little bit of information, the process will remain in the operating system’s process table as a zombie process, indicating that it is not to be scheduled for further execution, but that it cannot be completely removed (and its process ID cannot be reused) until it has been determined that the exit status is no longer needed.

 

When a child exits, the parent process will receive a SIGCHLD signal to indicate that one of its children has finished executing; the parent process will typically call the wait() system call at this point. That call will provide the parent with the child’s exit status, and will cause the child to be reaped, or removed from the process table.

 

Use top or ps command:

# top

OR

# ps aux | awk '{ print $8 " " $2 }' | grep -w Z

Output:

Z 6502
Z 8320
Z 6985

How do I kill zombie process?

You cannot kill zombies, as they are already dead. But if you have too many zombies then kill parent process or restart service.

You can kill zombie process using PID obtained from any one of the above command. For example kill zombie proces having PID 6985:

# kill -9 6985

 

 

 

For questions please refer to our Q/A forum at : http://ask.unixmen.com/

Share this Article: Facebook0Google+0Twitter1LinkedIn0Reddit0StumbleUpon0