Date: Tue, 18 Dec 2001 13:10:43 -0500 From: Garance A Drosihn <drosih@rpi.edu> To: BSD Freak <bsd-freak@mbox.com.au>, FreeBSD Questions <freebsd-questions@FreeBSD.ORG> Subject: Re: ping failure script Message-ID: <p05101004b84536ec64a9@[128.113.24.47]> In-Reply-To: <113fc9110004.110004113fc9@mbox.com.au> References: <113fc9110004.110004113fc9@mbox.com.au>
next in thread | previous in thread | raw e-mail | index | archive | help
At 2:03 PM +1100 12/17/01, BSD Freak wrote: >I want to run a shell script from cron that has the following >logic but I am totally unsure where to start with the syntax. >It goes like this: > >IF 3 consecutive pings to my.host.com fail THEN >echo "Link is DOWN!!" | mail me@mycompany.com >end Check the 'fping' module in ports. It is designed to make this sort of checking much easier (particularly if you are checking multiple hosts). -- Garance Alistair Drosehn = gad@eclipse.acs.rpi.edu Senior Systems Programmer or gad@freebsd.org Rensselaer Polytechnic Institute or drosih@rpi.edu 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?p05101004b84536ec64a9>