{"id":1431,"date":"2021-01-03T19:26:41","date_gmt":"2021-01-03T18:26:41","guid":{"rendered":"https:\/\/hannes.enjoys.it\/blog\/?p=1431"},"modified":"2021-01-03T19:30:00","modified_gmt":"2021-01-03T18:30:00","slug":"your-own-little-internet-speed-monitor","status":"publish","type":"post","link":"https:\/\/hannes.enjoys.it\/blog\/2021\/01\/your-own-little-internet-speed-monitor\/","title":{"rendered":"Your own little internet speed monitor"},"content":{"rendered":"\n<p>I wanted to monitor my ISP&#8217;s service over time and could not find any available simple tool for that. The usual system monitoring tools are usually displaying averages, not min\/max values. So I used WD40 (<a href=\"https:\/\/github.com\/sivel\/speedtest-cli\">speedtest-cli<\/a>) and duct tape (<a href=\"https:\/\/wiki.archlinux.org\/index.php\/Cron\">cron<\/a>) to make my own.<\/p>\n\n\n\n<p>You need to have a cron daemon set up and <code>speedtest-cli<\/code> installed.<\/p>\n\n\n\n<p>Then prepare an empty csv file with a header like this (don&#8217;t forget a trailing newline!) and store it in a path of your choice:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Server ID,Sponsor,Server Name,Timestamp,Distance,Ping,Download,Upload,Share,IP Address\n<\/code><\/pre>\n\n\n\n<p>Set up a cronjob at an interval of your choice (don&#8217;t be a dick) to run a speed test and log the results to the csv file:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>@hourly speedtest --csv &gt;&gt; \/home\/user\/path\/to\/speedtest.csv<\/code><\/pre>\n\n\n\n<p>If you have a fast connection you might spot slow test servers that would badly bias your results, so exclude them using the <code>--exclude<\/code> option if necessary.<\/p>\n\n\n\n<p>That&#8217;s all, you get a nice log of internet ping, upload and download speeds, ready to be visualized in your software of choice (like <a href=\"http:\/\/www.gnumeric.org\/\">the best spreadsheet software in existence<\/a>). I will have to complain to my ISP for that drop since mid December for sure:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"512\" src=\"https:\/\/hannes.enjoys.it\/blog\/wp-content\/uploads\/speedtestmonitor-1024x512.png\" alt=\"\" class=\"wp-image-1440\" srcset=\"https:\/\/hannes.enjoys.it\/blog\/wp-content\/uploads\/speedtestmonitor-1024x512.png 1024w, https:\/\/hannes.enjoys.it\/blog\/wp-content\/uploads\/speedtestmonitor-300x150.png 300w, https:\/\/hannes.enjoys.it\/blog\/wp-content\/uploads\/speedtestmonitor-768x384.png 768w, https:\/\/hannes.enjoys.it\/blog\/wp-content\/uploads\/speedtestmonitor-624x312.png 624w, https:\/\/hannes.enjoys.it\/blog\/wp-content\/uploads\/speedtestmonitor.png 1082w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>And now that I have written this, I realise that for plotting I could also just use a min\/max function for a moving time window in <a href=\"https:\/\/grafana.com\/\">Grafana<\/a> I guess? The speedtests would still be triggered and provide nice bursts of usage. Anyone got pointers on how to do that?<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I wanted to monitor my ISP&#8217;s service over time and could not find any available simple tool for that. The usual system monitoring tools are usually displaying averages, not min\/max values. So I used WD40 (speedtest-cli) and duct tape (cron) to make my own. You need to have a cron daemon set up and speedtest-cli [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[22,3,12,40],"tags":[],"class_list":["post-1431","post","type-post","status-publish","format-standard","hentry","category-commandline","category-guide","category-linux","category-small-things"],"_links":{"self":[{"href":"https:\/\/hannes.enjoys.it\/blog\/wp-json\/wp\/v2\/posts\/1431","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hannes.enjoys.it\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hannes.enjoys.it\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hannes.enjoys.it\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/hannes.enjoys.it\/blog\/wp-json\/wp\/v2\/comments?post=1431"}],"version-history":[{"count":5,"href":"https:\/\/hannes.enjoys.it\/blog\/wp-json\/wp\/v2\/posts\/1431\/revisions"}],"predecessor-version":[{"id":1444,"href":"https:\/\/hannes.enjoys.it\/blog\/wp-json\/wp\/v2\/posts\/1431\/revisions\/1444"}],"wp:attachment":[{"href":"https:\/\/hannes.enjoys.it\/blog\/wp-json\/wp\/v2\/media?parent=1431"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hannes.enjoys.it\/blog\/wp-json\/wp\/v2\/categories?post=1431"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hannes.enjoys.it\/blog\/wp-json\/wp\/v2\/tags?post=1431"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}