gri6507 has asked for the wisdom of the Perl Monks concerning the following question:
I have a UNIX program that, depending on the passed in options, could take a couple of minutes up to a couple of days to execute. This program talks to hardware through blocking calls that normally come back in at most a few minutes. However, when 'hardware problems' occur, the program would simply hang (because of blocking calls, as expected). Since these 'hardware problems' could occur at any time, I would like the program to send me an indication (an email probably) wheneven such a hang condition is detected.
I know how to send an email out once the hung state is detected. The question I have is how do I find out that this program is hung on a blocked call? In other words, I need a perl script that would look at the Program Counter (PC) of my program and see if the PC has not changed for some predefined time interval. Can that even be done? Any suggestions?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Detect a hung process
by fauria (Deacon) on Apr 12, 2005 at 21:10 UTC | |
|
Re: Detect a hung process
by bluto (Curate) on Apr 12, 2005 at 20:42 UTC | |
|
Re: Detect a hung process
by 5mi11er (Deacon) on Apr 12, 2005 at 23:30 UTC | |
|
Re: Detect a hung process
by moot (Chaplain) on Apr 13, 2005 at 03:30 UTC |