BB Unix Network Monitor - Message

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: {bb} Monitor for runaway processes?



On Thu, 2005-10-20 at 19:43, Shane Presley wrote:
> Hello,
> 
> I have a script that runs on my servers called generatereport.sh.
> 
> It should only run for a few minutes, but sometimes it gets hung and
> could run for days.
> 
> Are there any BB plugins that will monitor for runaway processes? 
> Ideally I'd like to check for any instances of generatereport.sh that
> are running for more than 12 hours.

You could use the standard client "procs" test (or a custom
version based on it) to check for your problem script and then
use an initial page delay to prevent it from triggering an alert
unless it over-runs. With this approach, the BB display will
turn red while the script runs, so it may not be ideal for your
environment.

The alternative would be to create a temporary "flag" file as
the first operation of your script and delete it at the end.
You could then use a custom extension script (or one of the
file monitor examples from the "deadcat" site) to trigger
an alert if the file exists and is older than a specified
amount.

Cheers, Phil.



-- 
For some reason a glaze passes over people's faces when you say
"Canada". Maybe we should invade South Dakota or something.
(Sandra Gotlieb, wife of the Canadian ambassador to the U.S.)

--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=
To unsubscribe from this list, or to subscribe to the bb-digest list
send e-mail to mailto:majordomo@bb4.com with unsubscribe bb -and/or-
subscribe bb-digest in the BODY of the message.


Home | Main Index | Thread Index