The following command line will use the Text to Speech converter in *nix to say the word “pingtastic” every time a successful icmp response message is received using the ping command.
while (true) do ping -c1 -t3 google.com && say "pingtastic" && sleep 3; done
I was working on a routing problem in an ECMP Core on a laptop and I couldn’t keep all the terminal windows on the screen. So when troubleshooting a route flap I could easily see when the connectivity was good. I found this script somewhere on the Internet (can’t remember exactly where, I saved it in a text file I was keeping notes on my work).
This gave me immediate confirmation when the route flap was occurring so I could check the terminal logs.
I found these useful too
Check Internet access:
while (true) do ping -c1 -t3 google.com && say "reached google" && sleep 3; done
Check the Default Gateway
while (true) do ping -c1 -t3 192.168.1.1 && say "gateway" && sleep 3; done
Kelly (@ocdune) notified me on twitter that “ping -a” on will use the system sounds to notify you.
while (true) do ping -a -c1 -t3 192.168.1.1 && sleep 3; done