Dealing with Zombie Process on Linux

I am going to start by defining what is a Zombie Process Well a Zombie Process is the actually the state of the process when the child dies before the parent process. In this case the structural information of the process is kept in the process table. Danger !!! Processes in Zombie State don’t use up any system resources. (Actually, each one uses a very tiny amount of system memory to store its process descriptor.) However, each zombie process retains its process ID (PID). If zombies are accumulating at a very quick rate the entire pool of available PIDs will eventually become assigned to zombie processes, preventing other processes from launching. In any case, a few zombie processes hanging around are no problem – although they do indicate a bug with their parent process on your system. How to remove or get rid of Zombie Processes ? You can't kill a Zombie Process the normal way as it does not exist. One way is by sending the SIGCHLD signal to the parent process. This signal tells the parent process to execute the wait() system call and clean up its zombie children. Example of the command:

kill -s SIGCHLD 
How can you list your Zombie Processes ? Normally you can see them by using the top command : 15_pic But also we can Example of the command: (ps aux | grep -w Zs)
[root@host]# ps aux | grep -w Zs
oracle     3142  0.0  0.0      0     0 ?        Zs   Jan05   0:00 [Oracle Tutorials] 
oracle     3219  0.0  0.0      0     0 ?        Zs   Jan05   0:00 [Oracle Tutorials] 
root      15129  0.0  0.0  61252   760 pts/4    S+   12:36   0:00 grep -w Zs
oracle    17112  0.0  0.0      0     0 ?        Zs   11:29   0:00 [sh] 
oracle    17387  0.0  0.0      0     0 ?        Zs   11:29   0:00 [sh] 
oracle    30994  0.0  0.0      0     0 ?        Zs   Jan04   0:00 [Oracle Tutorials] 
oracle    31303  0.0  0.0      0     0 ?        Zs   Jan04   0:00 [Oracle Tutorials] 
oracle    31737  0.0  0.0      0     0 ?        Zs   Jan04   0:00 [sh] 
oracle    31826  0.0  0.0      0     0 ?        Zs   Jan04   0:00 [sh] 
oracle    31861  0.0  0.0      0     0 ?        Zs   Jan04   0:00 [sh] 
oracle    31872  0.0  0.0      0     0 ?        Zs   Jan04   0:00 [sh] 
oracle    32056  0.0  0.0      0     0 ?        Zs   Jan04   0:00 [Oracle Tutorials] 
oracle    32062  0.0  0.0      0     0 ?        Zs   Jan04   0:00 [Oracle Tutorials] 
oracle    47086  0.0  0.0      0     0 ?        Zs   Jan04   0:00 [Oracle Tutorials] 
oracle    47316  0.0  0.0      0     0 ?        Zs   Jan04   0:00 [Oracle Tutorials] 
oracle    47321  0.0  0.0      0     0 ?        Zs   Jan04   0:00 [Oracle Tutorials] 
oracle    47481  0.0  0.0      0     0 ?        Zs   Jan04   0:00 [Oracle Tutorials] 
oracle    47570  0.0  0.0      0     0 ?        Zs   Jan04   0:00 [Oracle Tutorials] 
oracle    47582  0.0  0.0      0     0 ?        Zs   Jan04   0:00 [Oracle Tutorials] 
oracle    47649  0.0  0.0      0     0 ?        Zs   Jan04   0:00 [Oracle Tutorials] 
oracle    48010  0.0  0.0      0     0 ?        Zs   Jan04   0:00 [Oracle Tutorials] 
oracle    48111  0.0  0.0      0     0 ?        Zs   Jan04   0:00 [Oracle Tutorials] 
oracle    48196  0.0  0.0      0     0 ?        Zs   Jan04   0:00 [Oracle Tutorials] 
oracle    48685  0.0  0.0      0     0 ?        Zs   Jan04   0:00 [Oracle Tutorials] 
oracle    49630  0.0  0.0      0     0 ?        Zs   Jan04   0:00 [Oracle Tutorials] 
oracle    49724  0.0  0.0      0     0 ?        Zs   Jan04   0:00 [Oracle Tutorials] 
oracle    83350  0.0  0.0      0     0 ?        Zs   Jan05   0:00 [Oracle Tutorials] 
oracle    83395  0.0  0.0      0     0 ?        Zs   Jan05   0:00 [Oracle Tutorials] 
oracle    86877  0.0  0.0      0     0 ?        Zs   09:12   0:00 [Oracle Tutorials] 
oracle    87168  0.0  0.0      0     0 ?        Zs   09:12   0:00 [Oracle Tutorials] 
oracle    87338  0.0  0.0      0     0 ?        Zs   09:12   0:00 [Oracle Tutorials] 
oracle    87811  0.0  0.0      0     0 ?        Zs   09:13   0:00 [Oracle Tutorials] 
oracle    87994  0.0  0.0      0     0 ?        Zs   09:13   0:00 [Oracle Tutorials] 
oracle    89624  0.0  0.0      0     0 ?        Zs   09:15   0:00 [Oracle Tutorials] 
oracle    89836  0.0  0.0      0     0 ?        Zs   09:15   0:00 [Oracle Tutorials] 
oracle    90227  0.0  0.0      0     0 ?        Zs   09:15   0:00 [Oracle Tutorials] 
oracle    90458  0.0  0.0      0     0 ?        Zs   09:16   0:00 [Oracle Tutorials] 
oracle    92550  0.0  0.0      0     0 ?        Zs   09:19   0:00 [Oracle Tutorials] 
oracle    92554  0.0  0.0      0     0 ?        Zs   09:19   0:00 [Oracle Tutorials] 
oracle    99670  0.0  0.0      0     0 ?        Zs   11:13   0:00 [Oracle Tutorials]