From owner-freebsd-questions@FreeBSD.ORG Sun Mar 28 03:37:11 2010 Return-Path: Delivered-To: FreeBSD-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 760EF106566C for ; Sun, 28 Mar 2010 03:37:11 +0000 (UTC) (envelope-from jamebus@gmail.com) Received: from mail-pw0-f54.google.com (mail-pw0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id 4BEF88FC12 for ; Sun, 28 Mar 2010 03:37:11 +0000 (UTC) Received: by pwj4 with SMTP id 4so7660093pwj.13 for ; Sat, 27 Mar 2010 20:37:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:received:message-id:subject :from:to:content-type; bh=SzHUS9cjMKme83jojtmqkMADkWz4QXCp7kt40+5OKQ0=; b=i/9YNbG8RSqMICixUgB5pYJVwecyvnuXBJP+F/C2SOt8TkCnWVIBcHQxihz/IXPfVc M6Wrmuh3ftbH6OsYf5Ezv8C9fy54IAB+eiBOlZmEb1h3z5Fc9VrsP+VrmilrOCRuCtan 3sfJLjD16NT1kAfM1AJ5/N1jllPfKuQllo3J0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type; b=sMHfh2xSP0k6Sc56+71u/cbmtFqbhm6eNDZ6d4jGNpunK70YbLdRi5Z9W3xpd9f5sT jsxfRT1OsADVWclUu4owPgOE1BHtgIeVUyBIH8LooEMFiuI+h6o1jn6lKdkO4j7Eyw+K 38r6UcLz4BTYpXUlujHo8E0HtUFX6qUjc3bY8= MIME-Version: 1.0 Sender: jamebus@gmail.com Received: by 10.142.242.7 with HTTP; Sat, 27 Mar 2010 20:10:07 -0700 (PDT) In-Reply-To: <4BAEA222.2060904@daleco.biz> References: <1269691634.12702.11.camel@debian> <4BAEA222.2060904@daleco.biz> Date: Sat, 27 Mar 2010 21:10:07 -0600 X-Google-Sender-Auth: e193f86e17181f27 Received: by 10.142.4.34 with SMTP id 34mr1299643wfd.56.1269745807497; Sat, 27 Mar 2010 20:10:07 -0700 (PDT) Message-ID: From: James To: FreeBSD questions Content-Type: text/plain; charset=ISO-8859-1 Cc: Subject: Re: "internet connection tester script" 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: Sun, 28 Mar 2010 03:37:11 -0000 FWIW, here's what I use. Requires net/fping. #!/bin/sh target=ip.address.of.next.hop.out echo "- Started at `date`" is_dead=0 while true; do fping -q $target fping_rc=$? if [ $is_dead -eq 0 -a $fping_rc -gt 0 ]; then echo "! Failure at `date`" is_dead=1 fi if [ $is_dead -eq 1 -a $fping_rc -eq 0 ]; then echo " Alive at `date`" is_dead=0 fi sleep 30 done -- James.