banner



How To Find Zombie Process In Solaris

When a program is ran inside a beat in Solaris (Unix), the vanquish starts a new process to behave out the piece of work. And, some defunct/zombie processes might be showing as below on server.

$ ps -ef UID PID PPID C STIME TTY TIME CMD root 0 0 0 14:44:49 ? 0:00 sched root 1 0 0 14:44:49 ? 0:00 /etc/init – root ii 0 0 fourteen:44:49 ? 0:00 pageout root 3 0 0 14:44:49 ? 0:xix fsflush root 222 1 0 14:45:33 ? 0:00 /usr/dt/bin/dtlogin root 260 one 0 14:45:37 ? 0:00 /usr/lib/saf/sac -t 300 root 135 1 0 14:45:21 ? 0:00 /usr/sbin/inetd -s root 264 260 0 fourteen:45:37 ? 0:00 /usr/lib/saf/ttymon root 263 260 0 fourteen:45:37 ? 0:00 /usr/lib/saf/listen tcp marco 390 388 0 14:47:43 pts/3 0:00 ksh root 388 135 0 xiv:47:43 ? 0:00 in.telnetd root 374 222 0 14:47:25 ? 0:00 /usr/dt/bin/dtlogin marco 456 390 0 fifteen:eleven:37 pts/3 0:00 ./defunct marco 457 508 0 0:00 <defunct> root 472 390 0 xiv:59:34 pts/3 0:00 ps –ef

For example, a C programme creates a child process with the fork() office.  When fork() is called, the   operating system makes an near identical re-create of the original process.  Fork then typically returns the original procedure and a new child process.

A defunct, or Zombie process, is just that, a process information block that is waiting for the parent process to make clean it up.  While defunct processes do not have upwards any CPU time, RAM or IO, information technology does consume a process data block, a limited resources.  Ideally a program will clean up after any kid processes.

The clean up a zombie process, a parent simply enquires about the country of the process.  In one case the operating system sees that parent exercise so, it removes the zombie process from the procedure list.  Defunct processes are caused past the parent procedure non reaping its children.  Find out which process is the parentprocess of all those zombies (ps -ef).  Information technology'south that procedure in which the problem ordinarily lies.

When a child process terminates, information technology sends the signal SIGCHILD to the parent process.  Then y'all tin can make clean up after a child process by having a signal handler for the SIGCHILD issue.

If there are large number of defunct/zombie processes, system performance is degraded and it may exist about impossible to start a new login session (including via telnet or SSH) and somewhen the arrangement is hung.  To kill these defunct/zombie processes, you can simply consequence command below as root.

preap `ps -ef | grep defunct | grep -v grep | awk '{impress $2}'`

Print Friendly, PDF & Email

Source: http://datatengo.com/oralife/2016/07/11/killing-defunctzombie-process-in-solaris/

Posted by: kirbycathe1975.blogspot.com

0 Response to "How To Find Zombie Process In Solaris"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel