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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hung process id?

Status
Not open for further replies.

E3p0

Technical User
May 31, 2001
65
US
On Solaris 7 is there a way to identify a hung process? My situation is this an application we run from time to time get's hung and the usual cause is a hung process. The program uses 3 pid's and after a kill -9 on the right one is done it can be stopped and restarted. Unless the problem pid is killed the app cannot be stopped the normal way. So knowing the pid is not a problem, but is there an easy way to monitor or identify the hung process?

Thanks Never be afraid to ask for help!
 
Sometimes hung processes get themselves into a tight loop and start to use nearly 100% of a CPU's available resources. If you use prstat, top or perhaps /usr/ucb/ps uax | head you will see it is consistently at the top of the list.

In other cases they appear to hang because they're waiting indefinitely for something else to happen. If you run truss -p pid on each of the processes you should be able to identify the one that is not making many system calls quite easily. Usually it will be stuck on a wait() or be doing sleep()s while waiting for some event. Annihilannic.
 
Cool I'll give the truss -p pid a try. I do use top as well thanks Annihilannic...

Never be afraid to ask for help!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top