From owner-freebsd-questions@FreeBSD.ORG Thu Jul 6 15:08:04 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 217FC16A4DD for ; Thu, 6 Jul 2006 15:08:04 +0000 (UTC) (envelope-from paulh@bdug.org.au) Received: from mail.bdug.org.au (mail.bdug.org.au [202.72.170.31]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6828143D49 for ; Thu, 6 Jul 2006 15:08:02 +0000 (GMT) (envelope-from paulh@bdug.org.au) Received: from localhost (localhost.bdug.org.au [127.0.0.1]) by mail.bdug.org.au (Postfix) with ESMTP id 2D07E3C for ; Thu, 6 Jul 2006 23:07:58 +0800 (WST) X-Virus-Scanned: amavisd-new at bdug.org.au Received: from mail.bdug.org.au ([127.0.0.1]) by localhost (ant.bdug.org.au [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id truT-X70Wtvb for ; Thu, 6 Jul 2006 23:07:56 +0800 (WST) Received: from w2k2 (unknown [192.168.0.102]) by mail.bdug.org.au (Postfix) with ESMTP id 13EBA35 for ; Thu, 6 Jul 2006 23:07:56 +0800 (WST) From: "Paul Hamilton" To: Date: Thu, 6 Jul 2006 23:10:15 +0800 Message-ID: <032f01c6a10e$494e4c40$6600a8c0@w2k2> MIME-Version: 1.0 X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.6626 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506 Importance: Normal Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: using fping to monitor internet connection status X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Jul 2006 15:08:04 -0000 Hi, =20 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. =20 If one goes down, I don't care, maybe that server is down, so keep = pinging the other two etc. =20 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). =20 Any idea's on a ping tool or simple script? =20 =20 =20 Regards, =20 Paul Hamilton Busselton, 6280 Australia =20