in reply to Tracking child processes

My question is how to track child processes that run remotely on these machines so that if something goes wrong (or hangs indefinitely) the errant process can be identified and terminated?

Thats a pretty broad question, but the first model that pops into my head, is one where for every remote process you launch, you launch a companion watcher script, which watches the process and reports back via sockets. Then at your control machine, you collect the progress reports, and analyze them.

You will need an event loop system for your collection script( like POE, Tk, Gtk2, Glib ), so you can simultaneously collect socket data and analyze them.

The companion watcher script would sleep most of the time, waking up periodically checking the running time of it's assigned pid, log entries, etc, and reporting them in over the socket.


I'm not really a human, but I play one on earth. Cogito ergo sum a bum