Re: host availability



Walter Roberson wrote:
In article <ip-dnZhnhJmPxFnenZ2dnUVZ_tCdnZ2d@xxxxxxxxxxx>,
zee <Nospam@xxxxxxxxxx> wrote:

"Walter Roberson" <roberson@xxxxxxxxxxxx> wrote in message news:2cYwf.66317$tl.13822@xxxxxxxxxxx

In article <8eednQAOHqeY3lnenZ2dnUVZ_sednZ2d@xxxxxxxxxxx>,
zee <Nospam@xxxxxxxxxx> wrote:

I would like to get a perl, python script that would do the following:


Tell me when a host from a list of hosts went up or down, such as
google.com, my default gateway, comcast's mail server etc.


This is the discipline known as Availability Management. It is non-trivial and you're not going to get your answers with scripting only from your system.


Using ping will say, I can't get there from here. The reason can be many, but effectively, it just doesn't matter much. From time to time, however, I've seen 'unable to connect to FOO.COM', or 'page not available' as a direct result of the ISP DNS problems. I typically power of the modem/router and let it find another when it powers up after 30seconds.

You should also be aware, that many ISPs will stealth a ping request to things like the SMTP and HTTP servers. Your ping will always just timeout in such cases, but a TCP connection will still succeed.

Taking the simplistic approach,
running PING FOO.COM and monitoring for REQUEST TIMED OUT in the middle of normal timings will tell you that connectivity has been lost. This may be all you need.



-- --- Jeff B (remove the No-Spam to reply) .



Relevant Pages

  • Re: Cant see out to .co.uk from inside my .local domain (forward l
    ... "ping request could not find host xxx please check the name and try again" ... AD DNS space is whatever.local. ... Remove the hosts info. ...
    (microsoft.public.windows.server.sbs)
  • Re: connecting via broadband?
    ... > Ping statistics for 193.252.22.137: ... >> mail server and that it is responsive so you get a mail session ... >> host that responds to 'ping' does NOT mean the server program is ... >> actually running or responsive on that host. ...
    (microsoft.public.outlook.general)
  • Re: Strange PPPoe problem
    ... PING longbow.arroway.com 1472bytes of data. ... packets transmitted, 0 received, +1 errors ... server is causing icmp 3/4s from reaching the mail server. ...
    (Debian-User)
  • Re: host availability
    ... >>>google.com, my default gateway, comcast's mail server etc. ... a host was "up or down". ... If you don't get an answer to a ping request, ... happened to reset the interface right then, remote system got trojaned ...
    (comp.security.firewalls)
  • Re: issues with mail - dns
    ... I can not connect to my mail server on port 25 due to it being secure (that ... >> longer ping. ... If not, it's your firewall, dollars to doughnuts. ...
    (microsoft.public.windows.server.networking)