Automatic ISP Speed Testing + Recording Results reddit / BSD ---------------------------------------------------------------------- abbley · 2019-03-23 03:12 I am looking to run automatic ISP speed tests at prescribed intervals (Every 5-10 minutes) on my BSD server. I also need to have the results recorded so I can use them for troubleshooting purposes. It would be great if the solution also recorded other connection particulars such as response time, jitter, etc. If you know of any solution that addresses these needs please let me know! Thank you!   **Update - Solved:** I found that a combination between [speedtest- cli](https://github.com/sivel/speedtest-cli) and [speed- logger](https://github.com/ericmann/speed-logger) was the perfect setup. Not only does it autolog the information I want in a file, it also graphs it in the CLI and on a web interface. Pretty dang cool. ---------------------------------------------------------------------- bobobo1618 · 2019-03-23 06:32 Cron + speedtest-cli and maybe fping for latency/jitter. ---------------------------------------------------------------------- abbley · 2019-03-23 17:10 coolio ill look into this, thank you ---------------------------------------------------------------------- BlindTreeFrog · 2019-03-24 00:36 I used to run a script on my router that would download a random 100mg jpg a couple times and record the times. It would then email me the results... I think I lost the script though, sadly. Still wasn't hard to write once i found the data source. ---------------------------------------------------------------------- BlindTreeFrog · 2019-03-24 00:43 Nevermind, I still do have it. In case it gives you any ideas (no promises it was any good... I just needed to know if my connection wasn't staying up and for how long it was down so i could yell at my ISP) #!/bin/sh # server list from: https://github.com/Janhouse/tespeed/blob/master/serverlist.txt # and http://speedtest.reliableservers.com/ wget_timed () { _file=$1 /opt/usr/bin/wget -q -O /dev/null $_file #/opt/bin/sh -c '(/opt/bin/sleep 300; /opt/bin/kill $$ > /dev/null 2>&1) & exec '/opt/usr/bin/wget\ -q\ \-O\ /dev/null\ $_file'' # /opt/bin/sh -c '(/opt/bin/sleep 300; /opt/bin/kill $$ > /dev/null 2>&1) & exec 'echo\ "sub\ shell"\ $_file'' #wait $! } # Any wget's still running at this point are stalled. give subsequent ones 5 minutes to complete while pkill wget; do sleep 300; done sleep 30 if [ ! -e /tmp/bandwidth.csv ]; then #echo "TimeStamp;File Size;Avg;#1;#2;#3;#4;#5;#6;Notes" > /tmp/bandwidth.log echo -e "TimeStamp\t;1.89MB;7.54MB;16.99MB;30MB;100MB;100MB;Notes" > /tmp/bandwidth.csv fi #echo "Bandwidth @ " $(date +"[%Y.%h.%d] %R %Z") >> /tmp/bandwidth.log echo -n "$(date +"%Y.%h.%d %R %Z");" >> /tmp/bandwidth.csv _t0=$(date +"%s") wget_timed "http://peacedata.us/speedtest/speedtest/random1000x100 0.jpg?x=$start&y=3" wget_timed "http://speedtest.oit.duke.edu/speedtest/random1000x100 0.jpg?x=$start&y=3" wget_timed "http://speedtest29.suddenlink.net/speedtest/random1000 x1000.jpg?x=$start&y=3" wget_timed "http://glspeedtest.myglnc.com/speedtest/random1000x100 0.jpg?x=$start&y=3" wget_timed "http://speedtest.ral.tqhosting.com/speedtest/random400 0x4000.jpg?x=$start&y=3" wget_timed "http://speedtest.carolinanet.com/speedtest/random1000x 1000.jpg?x=$start&y=3" _t6=$(date +"%s") _davg=$(expr "(" $_t6 - $_t0 ")" / 6 ) echo -n "$_davg;" >> /tmp/bandwidth.csv #echo "$(date +"[%Y.%h.%d] %R %Z");1.89MB;" $(expr "(" $stop - $start ")" / 6)"s" >> /tmp/bandwidth.log _t0=$(date +"%s") wget_timed "http://speedtest.reliableservers.com/100MBtest.bin" _t1=$(date +"%s") _davg=$(expr "(" $_t1 - $_t0 ")" ) echo -n "$_davg;" >> /tmp/bandwidth.csv #echo "16.99MB::" $(expr "(" $stop - $start ")" / 6)"s" >> /tmp/bandwidth.log #echo "100MB::" $(expr $stop - $start)"s" >> /tmp/bandwidth.log _t0=$(date +"%s") wget_timed "http://speedtest.netcologne.de/test_100mb.bin" _t1=$(date +"%s") _davg=$(expr "(" $_t1 - $_t0 ")" ) echo -n "$_davg;" >> /tmp/bandwidth.csv #echo "100MB::" $(expr $stop - $start)"s" >> /tmp/bandwidth.log echo "300+ likely TIMEOUT" >> /tmp/bandwidth.csv ---------------------------------------------------------------------- abbley · 2019-03-24 04:17 awesome thank you, ill take a look at this :) ---------------------------------------------------------------------- abbley · 2019-03-24 08:58 I ended up using speedtest-cli with another program called speed- logger. They ended up working perfectly for me. I still need to look into fping for latency/and jitter but I have the most important part done! Thank you!