checking process time
Rossz Vamos-Wentworth
rossz at vamos-wentworth.org
Thu Sep 8 18:25:30 CEST 2005
I have a perl script used as a pipe for email that does some special
processing of data. Occassionally, unfortunately, it gets "stuck" and
does not terminate. When this happens, it ends up using most of the CPU
and pretty much screws up the system. Until I can track down what is
causing the infinite loop I was wondering if there was a way to check
the life of a process of a specific name and execute an event handler if
it's been running too long. The script should only take a few seconds
to run, so I figure if it is more than a few minutes old I can simply
have nagios kill the problem process (e.g. (kill -9 pid" should do the
job).
There is the problem if necessary privileges, too, but that's easy
enough to overcome.
--
Rossz
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
More information about the Users
mailing list