Subscribeping -i 60 192.168.1.2 > ping.log &while true; do
echo -n "$(date) "
ping -c 1 $2 | fgrep icmp_seq
sleep $1
done
$ ./ping-ts.sh 1 www
Sun Sep 25 10:07:25 BST 2005 64 bytes from www (127.0.0.1): icmp_seq=0 ttl=253 time=0.426 ms
Sun Sep 25 10:07:26 BST 2005 64 bytes from www (127.0.0.1): icmp_seq=0 ttl=253 time=0.408 ms
ping -c 1 $2 | fgrep icmp_seq with ping -c 1 $2 | fgrep icmp_seq || echo or actually add some text in there.You are not logged in, either login or create an account to post comments
posted by aneel at 11:57 PM on September 24, 2005