Skip to content

Instantly share code, notes, and snippets.

@dbirks
Last active February 10, 2023 08:22
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save dbirks/5f6e5aa6ebafec38d7e32e71867adb61 to your computer and use it in GitHub Desktop.
Save dbirks/5f6e5aa6ebafec38d7e32e71867adb61 to your computer and use it in GitHub Desktop.
Make a Speedtest log on a Ubiquity Edgerouter

Tested on an Edgerouter Lite, EdgeOS 1.9.0

Enable the Wheezy repo

configure
set system package repository wheezy components 'main contrib non-free'
set system package repository wheezy distribution wheezy 
set system package repository wheezy url http://http.us.debian.org/debian
commit
save
exit

Update from your newly-enabled repo

sudo apt-get update

Install pip

sudo apt-get install python-pip

Install speedtest-cli with pip

sudo pip install speedtest-cli

Write the csv headers to a new log file

speedtest-cli --csv-header > /home/ubnt/speedtest-log.csv

Edit cron

crontab -e

Append this to run a speedtest every 15 minutes

*/15 * * * * /usr/local/bin/speedtest-cli --csv >> /home/ubnt/speedtest-log.csv

(Cron opens with vi by default. i for insert mode, Esc to go back to command mode, :wq to write and quit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment