View Single Post

  #5  
Old 06-30-2008, 12:05 AM
Default Re: How to get an "alert" when a process dies

On Jun 30, 1:25*am, "Sebastian \"lunar\" Wiesner"
wrote:
> Nico Kadel-Garcia :
>
>
>
> > 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?

>
> >> 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.

>
> > Nagios.

>
> Suffers from the very problem, the OP was trying to avoid: *A quite great
> delay between the death of the specific process and the monitoring tool
> running the check and thus noticing the dead process. *Iirc, nagios uses
> even higher intervals than one minute between checks.
>
> I guess, the OP wants something like inotify for processes: *Passive
> checking, yielding an _immediate_ notification about state changes, without
> the unavoidable latency of active checks as nagios performs them.
>
> --
> Freedom is always the freedom of dissenters.
> * * * * * * * * * * * * * * * * * * * (Rosa Luxemburg)


Exactly - Time delays is what I try to get away from. Even seconds can
mean potential customers leaving your service because there's no
service :-(

Thanks for explaining my problem more clearly !
Reply With Quote