• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

UnixArena

  • Home
  • kubernetes
  • DevOps
    • Terraform
    • Jenkins
    • Docker
    • Openshift
      • OKD
    • Ansible engine
    • Ansible Tower
      • AWX
    • Puppet
  • Cloud
    • Azure
    • AWS
    • Openstack
    • Docker
  • VMware
    • vCloud Director
    • VMware-Guests
    • Vcenter Appliance 5.5
    • vC OPS
    • VMware SDDC
    • VMware vSphere 5.x
      • vSphere Network
      • vSphere DS
      • vShield Suite
    • VMware vSphere 6.0
    • VSAN
    • VMware Free Tools
  • Backup
    • Vembu BDR
    • Veeam
    • Nakivo
    • Azure Backup
    • Altaro VMBackup
    • Spinbackup
  • Tutorials
    • Openstack Tutorial
    • Openstack Beginner’s Guide
    • VXVM-Training
    • ZFS-Tutorials
    • NetApp cDot
    • LVM
    • Cisco UCS
    • LDOM
    • Oracle VM for x86
  • Linux
    • How to Articles
    • Q&A
    • Networking
    • RHEL7
  • DevOps Instructor-led Training
  • Contact

How to kill zombie process in solaris

June 15, 2012 By Cloud_Devops 4 Comments

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.

Filed Under: Solaris 10

Reader Interactions

Comments

  1. Athira says

    July 28, 2016 at 4:31 pm

    Hi,

    Is it necessary to reap zombie process?

    Regards,

    Reply
  2. bang says

    March 16, 2016 at 7:53 am

    hello,

    i can’t kill zombie process.

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

    Reply
    • r says

      April 13, 2016 at 12:03 pm

      need to be root.

      Reply
  3. venkatesh says

    January 20, 2015 at 8:48 am

    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.

    Thanks,

    Venkatesh

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

Follow UnixArena

  • Facebook
  • LinkedIn
  • Twitter

Copyright © 2025 · UnixArena ·

Go to mobile version