Date: Sun, 26 Sep 1999 16:50:10 -0400 (EDT) From: William Melanson <wjm@gate.net> To: Allen Cleveland <allenc@mindsieve.com> Cc: freebsd-questions@FreeBSD.ORG Subject: Re: changing ping output Message-ID: <Pine.A41.4.03.9909261646240.127268-100000@tiwa.gate.net> In-Reply-To: <3.0.5.32.19990925184302.008076f0@mindsieve.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.A41.4.03.9909261646240.127268-100000>