Tuesday, April 21, 2015

Monitor network on MacOS with

If you would like to test network connection on your macbook macos, you can run a script, which would say verbally when network is down. Just run this script in one of your terminal window, and it will tell you "Timeout" when internet is down. The script runs continuously. You have to stop it (Ctrl-Z) when you do not need to run it anymore.

Here is the script:

echo begin ping
while :
if ping -c 5 | grep timeout;
then echo `say "Timeout"`;
else echo `echo "internet is back up"`;

No comments:

Post a Comment