Created
October 15, 2012 21:27
-
-
Save opie4624/3895640 to your computer and use it in GitHub Desktop.
Revisions
-
opie4624 revised this gist
Oct 15, 2012 . 1 changed file with 4 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,12 +1,13 @@ #!/bin/bash LOG=/tmp/netlog-$1 rm -f $LOG while ( true ); do ping -c1 -t 1 $1 > /dev/null if [ "$?" -gt "0" ]; then echo `date` " I am offline" | tee $LOG traceroute -a $1 | tee $LOG fi sleep 5 ; done -
opie4624 revised this gist
Oct 15, 2012 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
Empty file. -
opie4624 created this gist
Oct 15, 2012 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,12 @@ #!/bin/bash LOG=/tmp/netlog rm -f $LOG while ( true ); do ping -c1 -t 5 www.google.com > /dev/null if [ "$?" -gt "0" ]; then echo `date` " I am offline" | tee $LOG fi sleep 60 ; done