Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

how can I determine if an aix process is hung

1,088 views
Skip to first unread message

Tony Gallo

unread,
Sep 5, 2001, 9:24:43 AM9/5/01
to
What is the easiest way to see if a process is hung. I thought it
could be done with issuing a ps -??? command but haven't been able to
determine the right parameters. I thought I could issue a ps command,
wait 30 seconds, issue it again and see some parameters grow but
haven't been able to get anything to work.

Thanks

Dan Hoffman

unread,
Sep 5, 2001, 2:20:55 PM9/5/01
to
Just do:
ps -ef | grep <easilyidentifiablename>

so if your program is called fred

ps -ef | grep fred
"Tony Gallo" <ga...@thruway.state.ny.us> wrote in message
news:a762a003.01090...@posting.google.com...

Bud Ice Penguin

unread,
Sep 5, 2001, 4:21:20 PM9/5/01
to
Wouldn't it be nice if there was a sign or symbol
that indicated a process was hung? Well the honest
answer is there is none. But certain indicators
can tip you off

1) Client process being hung off init as opposed
a shell or application. Something exited
without proper cleanup.

2) <defunct> processes.

BIP

ga...@thruway.state.ny.us (Tony Gallo) wrote in message news:<a762a003.01090...@posting.google.com>...

Nicholas Dronen

unread,
Sep 5, 2001, 6:04:55 PM9/5/01
to
Tony Gallo <ga...@thruway.state.ny.us> wrote:

That depends on what you mean by "hung." If you mean that the
process is stuck in kernel mode (and therefore cannot be killed
even with SIGKILL or stopped with SIGSTOP), I'd expect the S column
for the process in the output of ps -el to be 'S'. Corrections
welcome.

Regards,

Nicholas Dronen

--
$ more worth doing
/dev/null (END)

Asheesh Rastogi

unread,
Sep 7, 2001, 12:54:20 AM9/7/01
to
The S field could be S for various other cases as in thr process is wiating
to be scheduled and is genuinely
sleeping. The question here is a very open one..as you said yourself..it
would depend on what one means by hung.
Peace.
"Nicholas Dronen" <ndr...@io.frii.com> wrote in message
news:bkxl7.142$Owe.18...@news.frii.net...

Tejas Bhise

unread,
Sep 14, 2001, 8:59:48 AM9/14/01
to

"Bud Ice Penguin" <b_...@softhome.net> wrote in message
news:e91c60db.01090...@posting.google.com...


Usually there are two types of process which get called "hung" -

1) A real deadlocked scene
2) Some for/while loop with an improper ending condition which makes the
process loop infinitly ( shows up as process taking 100 % CPU )

Write a small script that attaches the debugger to the process and get a
stack trace of all threads. If the stack trace remains the same all the time
with all threads waiting/sleeping on events/locks then you probably have a
deadlock scene.

If you see one of the threads in the middle of a for/while loop somewhere
and have seen a 100% CPU utilization by that thread then it would help you
find that line of the code.

Regards,
Tejas.


0 new messages