Date: Wed, 7 Mar 2001 18:54:24 -0600 From: Gerd Knops <gerti@bitart.com> To: "dennis" <dennis@magix.com.sg> Cc: <freebsd-questions@FreeBSD.ORG> Subject: Re: monitor Message-ID: <20010308005424.1862.qmail@camelot.bitart.com> In-Reply-To: <000b01c0a767$32c75c10$1e00000a@a> References: <LIEGILFKEJFMCNAFGIFIOEAKCDAA.sudz@ns3g.com> <000b01c0a767$32c75c10$1e00000a@a>
next in thread | previous in thread | raw e-mail | index | archive | help
dennis wrote:
> I am using FreeBSD 4.2 and I am looking for a program to
> monitor telnet, ftp, sendmail, inetd, apache, mysql and to restart
> them after any failure.
>
> I have seen netsaint and monitord.
>
> Would it be possible to use cron instead ?
>
> Any suggesstions ? I am looking for the easiest way to do this.
>
A brute-force method I used for a while for apache was this (in the
cron), may be wrapped but is supposed to be on 1 line:
/bin/sh -c "ps `cat ${HTTPDHOME}/www/logs/httpd.pid` | fgrep -s
'/usr/local/bin/httpd' || /usr/local/bin/httpd -d ${HTTPDHOME}/www"
I guess similar methods could be used for other daemons as well.
Gerd
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010308005424.1862.qmail>
