Skip to content
This repository has been archived by the owner on Aug 16, 2024. It is now read-only.

ryanfitton/speedtest-cli-as-csv-cron

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

Speedtest CLI tests via CRON as .csv

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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages