Giter Site home page Giter Site logo

sandeepemail71 / netcheck Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tristanbrotherton/netcheck

0.0 1.0 0.0 2.14 MB

A shell script to check and log when your internet connection goes down.

License: Apache License 2.0

Shell 66.42% HTML 23.22% CSS 10.36%

netcheck's Introduction

Netcheck

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.

Installation

git clone https://github.com/TristanBrotherton/netcheck.git
cd netcheck
chmod +x netcheck.sh
./netcheck.sh

CLI Interface

Netcheck CLI interface

Web Interface

Netcheck CLI interface

Options

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

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 ./netcheck.sh -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:

./netcheck.sh -d sample-scripts/disconnected.sh -r sample-scripts/reconnected.sh

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.