Re: [plug] detect running application

Top Page

Reply to this message
Author: triton
Date:  
To: Philippine Linux Users' Group (PLUG) Technical Discussion List
Subject: Re: [plug] detect running application
Try monit... saved me a couple of times. Also it can automatically
start a process if it's down. Also sends and email if a process went
down or recovered.

http://www.tildeslash.com/monit/

On 8/16/06, Ariz Jacinto <acjacinto@???> wrote:
> monitoring the presence of the process is one thing but
> you may also want to consider monitoring if that process
> is operational.
>
> it's like monitoring a service (using Nagios, etc) by polling
> only the service port (connect) and without testing the
> complete service (connect, auth, read, write, dependencies,
> etc) which can lead to users' "downtime" if they can't write
> any data (ie. disk full).
>
>
>
>
>
>
> On 8/16/06, Rogelio Serrano <rogelio.serrano@???> wrote:
> >
> On 8/16/06, Federico Sevilla III <jijo@???> wrote:
>
> >
> > [1] http://www.kernel.org/software/mon/
> >
>
> I do this:
>
> int
> main()
> {
>     int retval;
>     int pid;
>    while(1)
> {
>     pid = fork();
>    if (pid)
>    {
>        wait(&retval);
>        tell_admin_via_email_you_are_restarting(retval);
>       if (retry++ >= 5)
>       {
>            tell
> admin_via_email_that_you_are_giving_up(retval);
>            exit(5);
>       }
>    sleep(1);
>    }
>    else
>    {
>        execl ("prog","prog","args",NULL);
>        _exit(5);
>    }
> }
> }

>
> But thats ugly.
>
>
>
>
> _________________________________________________
> Philippine Linux Users' Group (PLUG) Mailing List
> plug@??? (#PLUG @ irc.free.net.ph)
> Read the Guidelines: http://linux.org.ph/lists
> Searchable Archives: http://archives.free.net.ph
>
>

_________________________________________________
Philippine Linux Users' Group (PLUG) Mailing List
plug@??? (#PLUG @ irc.free.net.ph)
Read the Guidelines: http://linux.org.ph/lists
Searchable Archives: http://archives.free.net.ph