02-19-2011 11:15 PM
I tried to kill a zombie process but it could not stopted (top -> kill -9 PID).
top indicated of 5 zombie and several sleep processes.
The zombie process belong to other user.
I tried to rlogin to this user but it didnt work.
I tried to find an equivalent command pstree (in order to kill the parent) but I count found.
Solved! Go to Solution.
02-20-2011 12:54 AM - last edited on 09-02-2011 12:20 PM by Kevin_Paul
There is a 'pstree' script for HP-UX, see attachment... Hope that will help you!
BTW, there are quite a few threads on ITRC that discuss killing zombie processes, have a look at for example:
02-20-2011 03:09 AM
It is just a shell script. So just put it in /tmp (for example), rename it to 'ptree', give it executable permissions and run the script. See a copy/past from the script's code below:
# ptree [-n] [pid]
# ptree [-n] [pid] [level] [datafile]
# This command will print the process tree for the
# process identified by pid. When called by the user,
# only the first format shown should be used. If the
# process ID (pid) is not passed, process 1 is assumed.
# The second format of this command is only used when
# this command calls itself recursively to print the next
# level of the process tree.
# -n Do not recurse
I found the script in another thread on ITRC and it looks harmless to me. But just have a look at the code yourself if you have any doubts.
02-20-2011 04:31 AM
I put is on tmp
change the name for ptree
#chmod 777 ptree
ptree: command not found
then I tried to move it to .sh
# mv ptree ptree.sh
/sbin/sh: ptree: not found.
What did I miss?
02-20-2011 05:17 PM
Some kind of bad code.
It is not using 99% of the cpu.. look at your cpu utilization in top.
ONly way to get rid of zombies is to reboot if they do not go away after a few minutes.
02-20-2011 08:58 PM
A zombie who uses >90% CPU...
Is it dead or is it dead...
Sleep processes - yes it is normal that some processes have to wait for different events to take place.
rlogin - require specific setup of trust between your users. Normally you can not do rlogin (remote login) to users.
If you ar root user on the same machine you could use the su command to "login" as this user 'su user' or 'su - user' see man su
02-21-2011 10:45 AM
That's the problem, top gets it wrong.
>Only way to get rid of zombies is to reboot
That's not the only way. If you kill the zombie master, they will be reaped.
02-22-2011 12:32 AM
Every process or service has a "graceful" way of exitting and talking in terms of process, a zombie in any terminology would always mean "dead" but not as harmful as a "ghost" or a "living dead" in the sense that it's just " a memory release" that happened in a weird fashion leaving an entry in the "process table", a table that was rigid on 8.x but is now called as a "process list" as it is no more rigid.
The "graceful reboot", does this in the clean fashion and gets rid of this "defunct" stuff. Or as mentioned kill the master zombie to get rid of the dead.
02-23-2011 06:06 AM
I reconstructed it and the same senario, including ~100% cpu process occured.
I used a local script that "bring down" the inner software and kills all processes which involved with it.
Then I reconstructed it again, but this time I used the ptree script (for HP UX - shows all process and thier parents). I found the parent zombie process that called
The zombie disappeared but still the cpu process was very busy (~100%).
Shoulnt the zombie killing necessarily low the cpu ?
02-23-2011 06:17 AM
If you invoke 'top' or 'glance' what is the process that is using the most CPU? Is it related to the zombie or is it something completely different.
02-23-2011 10:33 PM
>Is it related to the zombie or is it something completely different.
I run the top parallel to the problematic process (on other HP machine) and most of time I saw the zombies (they are also rises as a factor of time).
When I bring down the process the cpu usage immediately goes back to its normal level and the zombies disapear, except of 1 the alwas exists (I dont know how or who is its parent).
02-24-2011 02:55 AM
>When I bring down the process the CPU usage immediately goes back to its normal level and the zombies disappear,
Well, you killed the zombie master.
>except of 1 the always exists (I don't know how or who is its parent).
A child of ia64_corehw?