Operating System - HP-UX
1825711 Members
3139 Online
109686 Solutions
New Discussion

Removing zombie processes

 
SOLVED
Go to solution
Doug_85
Regular Advisor

Removing zombie processes

Here's a script that removes zombie processes without rebooting. I received this script from a dba in california.

ps -ef|grep " 1 "|grep ?|grep -v oracle|grep -v root|grep -v acushare|grep -v lp

Thanks,
Doug
4 REPLIES 4
A. Clay Stephenson
Acclaimed Contributor

Re: Removing zombie processes

Send that script back to California. It does nothing of the sort unless you believe that sticking your head in the sand makes the bad guys go away.
If it ain't broke, I can fix that.
Steven E. Protter
Exalted Contributor
Solution

Re: Removing zombie processes

The script does not appear to be functional.

I'm attaching a script that does sometimes get zombie processes.

Once the zombie process has a ppid of 1, the only way to get rid of it is to boot the box.

See attachment.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Muthukumar_5
Honored Contributor

Re: Removing zombie processes

We can identify the process is weather zombie or not with ps or top command.

We can collect the process as,

ps -aefl | grep -v grep | awk '{ if ( $2 == "z" ) print $4 }'

where, ps with -l option is used to give the process is
O Process is running on a processor. S Sleeping: process is waiting for an event to complete
R Runnable: process is on run queue.
Z Zombie state: process terminated and parent not waiting.
T Process is stopped, either by a job control sig-nal or because it is being traced.

else top command will show the state,pid, command user details.

Use kill -9 to kill the zombie process.
Easy to suggest when don't know about the problem!
Sundar_7
Honored Contributor

Re: Removing zombie processes

at best, the script lists you the zombie processes in the system but does nothing about it.

There is no supported way to remove the zombie processes in the system.

They are just an entry in the process table and consumes no resource whatsoever. So you can just ignore them. But if you are really concerned, then I learned there is a program distributed by interex HP-UX community.

This is the information I found. But note this is not supported by HP.

The program is called kill zomb and may be obtained by calling Interex
(the International Association of Hewlett-Packard Computer Users) at
(408) 738-4848, fax (408) 736-2156, or writing them at:

Interex
Contributed Software Library/HP-UX
585 Maude Court
Sunnyvale, CA. 94088-3439
Learn What to do ,How to do and more importantly When to do ?