Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

Re: Process Reliablity

by barndoor (Pilgrim)
on Jul 20, 2000 at 15:03 UTC ( #23343=note: print w/replies, xml ) Need Help??

in reply to Process Reliablity

One way I've started using (thanks Dave B for the idea), is to get your process to log its pid when it starts (into a file or database table) and then remove that entry when it closes.

A little script starts every 10 minutes (either via cron or via a sleep command) and looks in the file/database for all the running processes. It then looks for those pids on the system using 'kill 0' tests. If it finds a pid in the list which isn't running it knows the process crashed.

For your purposes you may want this check script to run from cron so that it will reliably start every 'n' minutes.

The idea can be extended to support many jobs which you want to watch for failure. Hope this idea helps.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://23343]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (7)
As of 2020-03-29 18:35 GMT
Find Nodes?
    Voting Booth?
    To "Disagree to disagree" means to:

    Results (171 votes). Check out past polls.