No description, website, or topics provided.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
README.md
speedtest-csv

README.md

Speedtest CLI tests via CRON as .csv

  • Author: Ryan Fitton <ryan@ryanfitton.co.uk>
  • Version: 1.0.0
  • Date: 21/01/2019

Requirements

  • Python (python-pip)
  • speedtest-cli (Repo)
  • speedtest-csv (Repo)

Installation

  1. Switch to the root user:
sudo su
  1. Install speedtest-cli, run each line separately:
sudo apt-get install python-pip
sudo pip install speedtest-cli
  1. Download the speedtest-csv script. Note: A copy of this script is already stored in this repo, you can use this or re-download and make the changes to the file mentioned in step 5.
sudo wget -O speedtest-csv https://raw.githubusercontent.com/HenrikBengtsson/speedtest-cli-extras/master/bin/speedtest-csv
  1. Now give the file execute permissions:
sudo chmod +x speedtest-csv
  1. You will need to edit a line in the file to so that it can be run from CRON:
sudo nano speedtest-csv

Find the line cmd="speedtest-cli $opts and add /usr/local/bin/ before it so it reads:

cmd="/usr/local/bin/speedtest-cli $opts"

save the file and exit.

  1. Next move speedtest-csv to /usr/bin/:
sudo mv speedtest-csv /usr/bin/
  1. Generate the CSV header:
sudo speedtest-csv --header >> /cron/speedtest/speedtest.csv
  1. Add to the CRON:
sudo crontab -e
  1. Add the following line to the end of the file, this example is daily, ever four hours:
0 */4 * * * speedtest-csv >> /cron/speedtest/speedtest.csv

save the file and exit.