Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hung Process

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hi,

Does anyone know any unix command/ have any script ideas to see if a process has hung?

thanks,
Jon
 
do a command like

ps -ef | grep process_name

and look at the amount of time the process is accumulating. A hung process will often accumulate a lot of processor time as it spins about.

Sometimes.... a hung process will not accumulate any time at all - they hang for wildly different reasons. Mike
________________________________________________________________

"Experience is the comb that Nature gives us, after we are bald."

Is that a haiku?
I never could get the hang
of writing those things.
 
I believe that for several OS, you have a command to display the activity for a process. On Sun, it's truss, on SGI, it's par and for the other i don't remember ...
You may see if there's no Read/write activity.
Good Luck,
Gilles
 
Thanks Gilles, I'm using the truss command at the moment, if anyone has any other solutions please let me know....

Thanks,
Jon
 
what is truss telling you? Mike
________________________________________________________________

"Experience is the comb that Nature gives us, after we are bald."

Is that a haiku?
I never could get the hang
of writing those things.
 
Basically it's giving the processes read/writes, I'm thinking of perhaps redirecting this to a file & writing a loop to see if it's being appended to... This would let me know if it's hung or not.... A little crude perhaps, but should work...
 
Use "tail -f" to see if a file is being appeneded to.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top