From owner-freebsd-questions Sun Sep 26 13:48:42 1999 Delivered-To: freebsd-questions@freebsd.org Received: from onondaga.gate.net (onondaga.gate.net [198.206.134.31]) by hub.freebsd.org (Postfix) with ESMTP id 46AB3153A3 for ; Sun, 26 Sep 1999 13:48:39 -0700 (PDT) (envelope-from wjm@gate.net) Received: from tiwa.gate.net (wjm@tiwa.gate.net [199.227.0.141]) by onondaga.gate.net (8.8.6/8.6.12) with ESMTP id QAA174006; Sun, 26 Sep 1999 16:38:53 -0400 Received: from localhost (wjm@localhost) by tiwa.gate.net (8.8.6/8.7.3) with ESMTP id QAA84462; Sun, 26 Sep 1999 16:50:10 -0400 X-Authentication-Warning: tiwa.gate.net: wjm owned process doing -bs Date: Sun, 26 Sep 1999 16:50:10 -0400 (EDT) From: William Melanson To: Allen Cleveland Cc: freebsd-questions@FreeBSD.ORG Subject: Re: changing ping output In-Reply-To: <3.0.5.32.19990925184302.008076f0@mindsieve.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sat, 25 Sep 1999, Allen Cleveland wrote: % % I'd like to ping an ip address, but only see output when the address % *doesn't* return a reply, and I'd also like to have the times a reply % *isn't* returned timestamped. % % I just read ping(8) and I don't see a way to turn off the output of replies % and only see packets that didn't get a reply, nor do I see a way to % timestamp any of the output. I want to use this to tell me when my % connection fails, even if I'm not sitting at the computer. % % If there is a better way, using another command, or anyone has any ideas in % general, I'd very much appreciate your input. % % In it's simplest form I'd make a shell script to resemble this: #!/bin/sh # while true do if `ping -c 1 ip_address_of_trusted_host >/dev/null 2>&1`; then sleep 60 else echo "Hostname_lost_connection `date`" >> /root/results.txt sleep 60 fi done --------------------------------oOo------------------------------------ William J. Melanson CyberGate, Inc. | e.spire Communications Sr Network Controller Deerfield Beach, FL 33441 Network Operations Center Phone: (954) 429-8080 finger wjm@gate.net PGP public key --------------------------------oOo------------------------------------ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message