Operating System - HP-UX
1752664 Members
5470 Online
108788 Solutions
New Discussion юеВ

Re: Best way to locate and kill a zombie

 
SOLVED
Go to solution
John Jimenez
Super Advisor

Best way to locate and kill a zombie

While running top, there is one zombie running. What is the best way to locate this "PID", so I can kill it?
Hustle Makes things happen
15 REPLIES 15
Ralph Grothe
Honored Contributor
Solution

Re: Best way to locate and kill a zombie

I'm afraid, I think you won't be able to kill, because the Zombie is waiting for its parent process to fetch its exit code through a wait() or waitpid() syscall by the parent.

However, you can get the PID from the process table if you grep for the string "defunct"

e.g.

ps -ef|grep defu
Madness, thy name is system administration
Sridhar Bhaskarla
Honored Contributor

Re: Best way to locate and kill a zombie

Do a "ps -ef|grep defunct".

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Patrick Wallek
Honored Contributor

Re: Best way to locate and kill a zombie

top shows the PIDs of processes. The 3rd column of the top output is the PID. However, it the process truly is a zombie, then you probably won't be able to kill it. Why? BECAUSE IT'S ALREADY DEAD!!!! To quote from an HP Performance expert.
Helen French
Honored Contributor

Re: Best way to locate and kill a zombie

You can find out the PID from top itself or from grep' ing with 'defunct. But you cannot kill those processes since it's already dead. The best way to get rid of those processes is to reboot the system!
Life is a promise, fulfill it!
John Jimenez
Super Advisor

Re: Best way to locate and kill a zombie

Thanks, I greped "defun" and it found it.
# ps -ef | grep defu
root 3047 2718 3 Feb 15 ? 0:00
root 9189 969 0 09:39:11 ttyvb 0:00 grep defu

It has actually been a long time since I have seen a zombie. As I remember I thought that I can just kill this "PID"? if not how would I get rid of it?
Hustle Makes things happen
John Jimenez
Super Advisor

Re: Best way to locate and kill a zombie

Okay, I will not worry about it, I will just let the reboot take care of it. thanks a lot....
Hustle Makes things happen
melvyn burnard
Honored Contributor

Re: Best way to locate and kill a zombie

Sorry to dissappoint you, but he only way to get rid of a zombie process is to rebot.
You cannot kill what is already dead.
In the words of John Cleese, from hte pqrrot sketch in Monty Python:
It is an ex-parrot, it has ceased to be, it is no more.
It's DEAD
My house is the bank's, my money the wife's, But my opinions belong to me, not HP!
Helen French
Honored Contributor

Re: Best way to locate and kill a zombie

Read this for more information about defunct processes TKB #S1100000464:

http://support2.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000063236571
Life is a promise, fulfill it!
Pete Randall
Outstanding Contributor

Re: Best way to locate and kill a zombie

John,

What is the parent process? Do a "ps -ef |grep 2718". I would have expected a zombie to be owned by init (PID 1).

Pete

Pete