View Single Post

  #19  
Old 07-03-2008, 08:05 PM
Default Re: How to get an "alert" when a process dies

nicc777 wrote:
> Hi all,
>
> Even though I use Linux a lot, I have not been doing a lot of hard
> core Linux sysadmin stuff for some time, hence the question here :-)
>
> Is there a way to trigger an event (like running a script) when a
> process dies? Perhaps even a script to restart a process if it detects
> that it's dead?


For your purposes, start the program from inittab. The init process will
relaunch if it dies.

>
> I have been using cron for monitoring processes up to now, but the
> monitoring interval is 1 minute apart. I have a project (streaming of
> nature) that should not go down, but the problem is that sometimes it
> dies and it takes up to a minute before the traditional monitoring
> script will restart it.
>
> Any ideas?
>
> Thanks - Nico.

Reply With Quote