Giter Site home page Giter Site logo

bechirzalila / auto-speedtest Goto Github PK

View Code? Open in Web Editor NEW

This project forked from wlanfr3ak/auto-speedtest

0.0 2.0 0.0 347 KB

Automated speed test with log and graphical Output

License: GNU General Public License v2.0

Shell 60.00% Python 35.01% HTML 4.98%

auto-speedtest's Introduction

auto-speedtest

My ISP has a FTTH network with coaxial cable running into appartments. In the middle of the day the download speed is so slow that I usually have about only 1% of the bandwith advertised in my agreement. I think they are stingy with adding more peering points... So I have decided to make speed tests every 5 minutes and log the results to have an overview (and make a lots of traffic ๐Ÿ˜ˆ).

The Results you can see here

I hope you find it useful, too. Please copy, share, fix and send me feedback (I'm really bad at coding).

How to use

  1. First download Python and speedtest-cli
  2. Run speedtest.sh
  3. Make a crontab entry with your desired time interval (for slower connections use greater time intervals)
  4. Write a frontend website with graphs and statistics and send me your source code ;-)

Crontab

  1. Edit your contab with: crontab -e
  2. Insert a new line line like */5 * * * * /home/username/speedtest.sh > /dev/null to run every 5 minutes

Log-Syntax

The generated log file contains a new line for each measurement in the following format:

YEAR-MONTH-DAY;HOUR:MINUTE:SECOND;PING;DOWNLOAD;UPLOAD

The values for PING, DOWNLOAD and UPLOAD are all floating point numbers.

Speedtest-CLI

speedtest-cli is a:

Command line interface for testing internet bandwidth using speedtest.net

  1. Download speedtest-cli in the same directory as speedtest.sh: wget -O speedtest-cli https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py
  2. Make it executable: chmod +x speedtest-cli

Display

See this Links https://codingworld.io/project/das-20-x-4-zeichen-mit-dem-raspberry-pi

Install the Framework for the Display on a Raspberry Pi via:

sudo pip-3.2 install RPLCD

add the display.py to your Directory and activate the Commented Line in the speedtest.sh to start the Script.

Preview alt text

Graph-Builder

This module is experimental. It generates graphs from the log file which can be used on websites etc.

  1. Install dependencies (Ubuntu): sudo apt-get install python3 python3-matplotlib
  2. Run it: python3 graph-builder.py

This reads from test.csv and exports three images called download.png, upload.png and ping.png into the current directory.

Ideas for the Future

  • Export/Backup the data
  • Export the graph images for specific date ranges (day, month, year, custom range)
  • Write HTML code to show the graphs with selection of day, month, year etc. Alpha in index.html + generator.sh
  • Traffic extension which calculates the traffic passed through the router and the part of the speed test traffic for a better overview
  • Add Automatically Upload to a Website
  • Add Capacity, problems with a AVM FritzBox in Internal LAN

THX to AS25415 for Hosting Server ID 4617 under 212.51.1.42 <3

auto-speedtest's People

Contributors

wlanfr3ak avatar bechirzalila avatar ckubrak avatar muellermartin avatar jsejcksn avatar

Watchers

James Cloos avatar  avatar

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.