Internet Speed Tests on a Raspberry Pi

image

A couple of weeks ago soynerdito soynerdito shared a bot he made to tweet internet connection speed results every now and then.

I then remembered I had a Raspberry Pi I wasn’t using at all. So I built a small app that runs speed tests every 3 hours. It’s based on speedtest-cli which is a Command line interface for testing internet bandwidth using speedtest.net.

The only difference with the one I built is that instead of tweeting the results, it posted all available data to an endpoint. I built a Flask app that can be used to store those results for different users as well as share them via a JSON API.

If you’re interested in running your own, check this Gist out. It contains a README file that will help you setup your box(doesn’t have to be a Raspberry Pi). It also includes a sample Flask app to store your own results. If you’re interested in using the one I’m hosting you could do so, just let me know and I’ll send you a URL to store results and one to share or consume. It’d be interesting to see different kinds of results at a larger scale, not just my own.

Here are the results graphed since I started running it. Interesting to see how so many spikes in my download speeds. Those are probably related to download in other computers or probably streaming Netflix. Upload speed as expected doesn’t really fluctuate that much.

Photo credit: John Talbot