Skip to content

Just a simple script to parse the results from speedtest and output them in a TAB spaced .txt file for easy plotting later on.

Notifications You must be signed in to change notification settings

alessando-guida/speedtest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

Monitor banda connessione internet

DESCRIZIONE:

Applicazione semplice per creare un log dello stato della connessione a internet. Questo programma utilizza il seguente comando:

$ speedtest --simple

e cattura l'output generato nel formato:

> Ping: 12.96 ms
> Download: 1.17 Mbits/s
> Upload: 0.79 Mbits/s

Lo script in python eseguite il parsing e aggiorna il file speed_log.txt. In caso il testo non vada a buon fine, viene catturata l'eccezione e automaticamente aggiornati i valori di banda di connessione pari a "0". L'output generato è un TAB spaced table. Questo script è stato studiato per essere utilizzato in congiunta con "Crontab". Modificare Crontab ed aggiungere quindi l'intervallo di tempo desiderato per eseguire i test.

DIPENDENZE:

INSTALLAZIONE DIPENTENZE:

$ pip install speedtest-cli

###USAGE: modificare lo script e cambiare le variabili globali che puntano al eseguibile speedtest e la PATH dove si trovano gli scripts

$ python main.py

###NOTE: La tabella puo' quindi successivamente essere importata in excell per visualizzare graficamente il tutto. Per configurare crontab e far partire lo scrip ogni 30 minuti usare

crontab -e

e aggiungere la seguente riga:

*/30 * * * * /usr/bin/python3.4 /PATH/main.py /PATH/croneout.txt 2>&1

questo fara partire lo script ogni 30 minuti e manda lo STDOUT e STDERR output nel file croneout.txt specificato.

About

Just a simple script to parse the results from speedtest and output them in a TAB spaced .txt file for easy plotting later on.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages