using fping to monitor internet connection status
paulh at bdug.org.au
Thu Jul 6 15:08:04 UTC 2006
I need to monitor a number of IP addresses, so that if they ALL go down (say
three IP's), then that is a pretty good indication that my server has lost
internet connectivity. The most probable cause is usually the ADSL router,
and therefore needs a reboot. I was hoping to use the 'fping' program, but
looking through the man file, there doesn't seem to be an exit status on
loosing ALL the pings.
If one goes down, I don't care, maybe that server is down, so keep pinging
the other two etc.
I was hoping to write this in Perl (the first fping example looked ok, until
I realised that it would activate when any one IP address became
unreachable, which means that I am still connected to the Internet).
Any idea's on a ping tool or simple script?
More information about the freebsd-questions