I was assigned to monitor the link status here in the company because we had many problems regarding our new TEData internet line. We couldn’t calculate exactly when the line is down and up, so I wrote a small script to run as a cronjob to create a log for the internet connectivity status.

The script is quite useful and very light, it’ll generate a log about your internet connectivity and will try to detect the reason of the internet connectivity problems.

Note: you’ll need to change the value of the variable GATEWAY_IP to your gateway/router/dsl_modem IP address before running the script. And you don’t have to be root to run this script.

you can download it from this link