Re: centos command to monitor a process for exit

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



On Thu, Jan 10, 2008 at 10:22:56AM -0500, Jerry Geis wrote:
> Is there a command that will monitor a process for exiting (crash or
> normal exit) and then execute another command based on the said
> process no longer being active?

You can use SNMP to do this.  It will set a flag in a certain OID which
you then need to monitor.  I _believe_ you may even be able to tell
snmpd itself to call a process, but I don't recall on that.

Check the man pages.

>
> Or is there a "wrapper" command that runs a process and when that
> process exists due to crashing or just exiting normally) that another
> process can be run.

You might look into something like daemontools[1].  It might be a
little overly complex.  You could certainly script something yourself.
However, daemontools are quite reliable.

Ray

[1]: http://cr.yp.to/daemontools.html
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux