Operating System - HP-UX
1758364 Members
2467 Online
108868 Solutions
New Discussion юеВ

How to view the hung process

 
SOLVED
Go to solution
senthil_kumar_1
Super Advisor

How to view the hung process

Hi

I am using linux and HP-UX. in that how to view the hung process.
7 REPLIES 7
Suraj K Sankari
Honored Contributor
Solution

Re: How to view the hung process

Hi Senthil,

Hung process are called "defunct" or "zombie" process, you can find using

#ps -aef | grep zombie
or
#ps -aef | grep defunct

for detail information see the below link

http://www.webmasterworld.com/forum40/1032.htm

Suraj
Pete Randall
Outstanding Contributor

Re: How to view the hung process

That's a pretty wide-open question. Which system has the "hung" process: linux or HP-UX? Is it a particular process that is hung? Or the whole system? Do you know which process it is or are you trying to find out which one?

We really need more info to go on.


Pete

Pete
Pete Randall
Outstanding Contributor

Re: How to view the hung process

After seeing the "defunct" process comment, I have more questions. Why would a defunct process be the only type of process that might be considered hung?


Pete

Pete
senthil_kumar_1
Super Advisor

Re: How to view the hung process

Hi

I want to find defunct and zombie process.
James R. Ferguson
Acclaimed Contributor

Re: How to view the hung process

Hi:

> I want to find defunct and zombie process.

Then:

# ps -ef|grep defunct

You can also examine the state colunm in a 'ps' output looking for "Z" whcih denotes a dead (defunct, or zombie) process.

# UNIX95= ps -e -o pid,state,comm

Regards!

...JRF...
TTr
Honored Contributor

Re: How to view the hung process

In many cases a process is hung as far as an admin or an end user is concerned but as far as the OS is concerned the process is runing fine. Other than defunct and zombie there is no characterization for a hung process. A process can be in various states such as running, sleeping, waiting for i/o, blocked on i/o, waiting on semaphores etc. In many cases we consider these processes hung but the UNIX kernel does not. So it is up to us to know if what a process is doing is really valid or not. Checking for that is not always easy or trivial and it involves looking at process logs if they exist or in a case of a database there are additional tools to use.
Dennis Handly
Acclaimed Contributor

Re: How to view the hung process

>I want to find defunct and zombie process.

Zombie processes aren't hung, they are dead. It is the zombie master that is keeping them around due to sloppy programming.