[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cobalt-users] Failover for the Raq 2
- Subject: Re: [cobalt-users] Failover for the Raq 2
- From: flash22@xxxxxxx
- Date: Mon Jun 26 12:26:34 2000
On Sat, 24 Jun 2000, Dean Russ wrote:
> Does anyone know of a script which can
>run a command (i.e. /etc/rc.d/inet.d/httpd start)
>on a local server when a remote server port or
>IP address(mail, web or DNS) is not responding to a ping?
How is that going to fix the remote machine?
You can't , by definition, ping a port....
There are a few programs floating aroung that check if network services
are alive by connecting to them from time to time....most are scriptable
and can be made to run things when something dies, there are a number of
complications tho, not the least of which is what happens if you just have
network problems, repeatedly restarting services because a network card
burped is jut going to make things worse....
for a very simple (and somewhat stupid script:
#!/bin/sh
while true; do
if ping -c 1 >/dev/null somehostname
then echo "its alive"
else echo "its dead"
fi
sleep 300 #5 minute intervals
done