Home / Solaris 10 / How to kill zombie process in solaris

How to kill zombie process in solaris

A zombie process or defunct process is a dead process that has completed execution but still it may be in the process table.

Defunct processes are child processes that terminated. The process image in the kernel for that process is no more. It no longer exists. Defunct processes do not take up any CPU time, RAM or IO.The reason for still seeing that process via the process listing table in the kernel, is a parent process issue.

When the child process terminates, the kernel sends a signal to the parent process to inform the parent of that. A defunct child process means that the parent process has not (yet) acknowledged that signal. Until it does, the child process entry will remain in the process table.Defunct processes are caused by the parent process not cleaning up its children. 
You can find the defunct process on you system by using ps command.
Just grep the “def” from ps output to identify those defunct process.
[root@myhost ~]# ps -ef |grep -i defunct
root 17775 17704 0 - ? 0:00
root 18560 18498 0 - ? 0:00
root 24486 24262 0 - ? 0:00
root 9293 8976 0 - ? 0:00
root 28391 28205 0 - ? 0:00
root 4143 24683 0 - ? 0:00
To clear the zombie process ,use preap command to clear it.
This command will clear the defunct process from process tree.
$ preap 17775 
17775: exited with status 0
The above command output says ,the command completed successfully .

Now you can see the defunct pid will be no logner exists.
$ ps -ef |grep  17775   |grep -v grep
If you still not able to clear the zombie process,then only way to reboot the server.
Prior to rebooting the servers,collect the following information.These information will be required to find the root cause for the issue. 
1.Take the ps -ef output
2. If possible run the sun explorer and collect the data .
3. Take other necessary  configuration backups like df,netstat,ifconfig commands output and reboot the server.

Thank you for reading this article.Please leave a commet if you have doubt on this. I will get back to you.


  1. Hi Admin,

    I read ur article it is good.

    I want more information on this Defunct/Zombie process, as u said it wont take any CPU/RAM/IO. need clear information on this

    I Appreciate ur quick replay on this.



  2. hello,

    i can’t kill zombie process.

    linus 8133 8123 0 – ? 0:00
    linus>preap 8133
    preap: cannot examine 8123: permission denied

  3. Hi,

    Is it necessary to reap zombie process?