Skip to content

A shell script to check and log when your internet connection goes down. Pull requests are welcome.


Notifications You must be signed in to change notification settings


Repository files navigation


A shellscript to check and log when your internet connection goes down. Netcheck checks for internet connectivity and if its interupted, writes a log containing the time of disconnect, and length of time disconnected. Once it reconnects it will log the reconnected internet speed and continue monitoring again.

Netcheck also include an optional web interface for viewing your connection logs remotely from a web browser. You can use a service such as NGROK to allow you to see the web interface outside of your network.

PRs Welcome!

If Necheck is mising something you'd like to have, feel free to submit a PR.


git clone
cd netcheck
chmod +x

CLI Interface

Netcheck CLI interface

Web Interface

Netcheck CLI interface

Options -h                                           Display this message -f path/my_log_file.log          Specify log file and path to use -s                                 Disable speedtest on reconnect -c                Check connection ever (n) seconds. Default is 5 -u            URL/Host to check, default is -w                                  Enable the remote webinteface -p                  Specify an optional port for the webinterface -i                           Install netcheck as a system service -d path/script            Specify script to execute on disconnect -r path/script             Specify script to execute on reconnect -t path/script        Specify script to execute after every check -e                      Excecute speedtest every connection check

Run as a service

You can optionally run netcheck as a system service. For systems that use systemctl (Linux) you may use its service installation script:

sudo ./ -i

Scripts for disconnect/reconnect events

You can optionally define actions to be executed upon disconnect or reconnect. To do so you may use the -d and -r options.

Two sample bash scripts making use of the espeak-ng text-to-speech utility are provided under the sample-scripts to showcase how these options can be used:

./ -d sample-scripts/ -r sample-scripts/

Script to display link down events

A github-like activity chart displaying link down events can be displayed with:


To load custom log file use the -f option:

./ -f path/my_log_file.log

Link down events graph

(The script is adapted from [])