Service monitoring daemon
jeem machine
jmachine at gmail.com
Mon Aug 2 00:20:24 UTC 2004
On Fri, 30 Jul 2004 17:58:51 -0700, Mark <msalists at gmx.net> wrote:
> Thanks guys, but this is all too high level. I am already using nagios for
> the remote monitoring, but what I need here is merely a local script that
> just checks if a certain daemon or process is still running and if not
> starts it again - no remote, no alert, etc...
> So it's more a "make sure it's still running and if not restart it" than a
> monitoring thing.
>
> Thanks,
>
> MARK
>
>
>
You could do this by:
ps -aux | grep $servicename | grep -v grep)
Then check if grep returned true
isit=$(echo $?)
#If this returns 0 then it is running if not restart the service.
This is how I would go about it. If you need an actual script I will
have to consult my books.
Jeem
> > -----Original Message-----
> > From: fedora-list-bounces at redhat.com
> > [mailto:fedora-list-bounces at redhat.com] On Behalf Of Kevin Wang
> > Sent: Friday, July 30, 2004 5:51 PM
> > To: For users of Fedora Core releases
> > Subject: Re: Service monitoring daemon
> >
> >
> > see also Nagios
> >
> > http://www.nagios.org/
> >
> >
> > --
> > fedora-list mailing list
> > fedora-list at redhat.com
> > To unsubscribe: http://www.redhat.com/mailman/listinfo/fedora-list
> >
>
> --
> fedora-list mailing list
> fedora-list at redhat.com
> To unsubscribe: http://www.redhat.com/mailman/listinfo/fedora-list
>
More information about the fedora-list
mailing list