HTML/JS to make graphic bandwith reports made with my modified version of Speedtest-cli. You can show upload, dowload speed and latency combined or separatedly. Also displays averages.
- Install my modified version of https://github.com/gonzalo/speedtest-cli/tree/devel
- Install a webserver (apache, nginx...) no need of php or any special module
- Add bandwidth.html and bandwidth_report_sample.csv somewhere in the webserver folder. Point with your navigator to the bandwidth.html file and test that works correctly. You shoud see something like this
- Add a cronjob to execute speedtest-cli and store results in the same folder of bandwidth.html. Be sure that user that executes the script has write access to that folder, also check script location and the name that you want for the csv file. Next example executes the test every hour.
$crontab -e
0 */1 * * * /root/git/speedtest-cli/speedtest_cli.py --csv /var/www/bandwidth_report.csv
- Finally modify bandwidth.html to point to your new csv file. Find this line:
req.open('GET', 'bandwidth_report_sample.csv', true);
...and adjust it to your needs.