Ookla Speedtest CLI

Hi there,

Now that Ookla has released an official SPEEDTEST® CLI client, is it possible to get this installed and running on openwrt? What is involved in this?


1 Like

As far as I can see, they only provide a compiled binary, so it can only be used on the platforms they have decided to support.


Ah thanks for your response. So I should contact Ookla themselves and ask if they can support it on openwrt?

It is not ideal to run the speed test on the device you are trying to measure.

I would suggest running the speedtest from a PC or laptop connected to your router instead of directly on the router itself.


A bit off topic, but speaking of Speed test, when you select a server, it can be a good idea to select a server that's no your ISP's.

In my case, for example, if I select a server that belongs to my ISP I often get a result that more or less represents my line attainable rate. If on the other hand I choose a different server, also in the same area, I get a result that's closer to my contracted speed.


You can contact them and ask, nothing to lose...
I think there was some other alternative already supported, but I cannot remember the name.

1 Like
1 Like
  • Speedtest.net has migrated to using pure socket tests instead of HTTP based tests
  • This application is written in Python
  • Different versions of Python will execute certain parts of the code faster than others
  • CPU and Memory capacity and speed will play a large part in inconsistency between Speedtest.net and even other machines on the same network

opkg install python-pip
pip install speedtest-cli

Its a pretty big install though. Also, im getting higher pings and lower speeds on the router itself rather than my pc through ethernet.

I just reinstalled speedtest-cli on my router. It was about 10.5 MB. Make sure you have enough space before installing. You could probably delete most of the pip dependencies after installing speedtest. Ill try out which packages when I have some time. Now my speeds match my desktop but ping is definitely higher on the router, 4-5 ms on PC and 11-12 ms on OpenWRT.

The Python Speedtest is very different from the Ookla speedtest, and in my experience gives poor and erroneous results. I have a Raspberry Pi 4B I am using with OpenWRT. Before I installed OpenWRT on it, I ran up Raspian and installed the Python Speedtest. It only gave me around 80Mb/s even though my Virgin Media UK service was capable of 360Mb/s. I then downloaded the compiled Speedtest binary from Ookla and even when specifying the same server as the Python version, the results were much different - I got around 350-360Mb/s on every pass.

I tried downloading the Speedtest binary on OpenWRT on my Pi4B with OpenWRT, and it won't run. I installed the Python version and it gives better results (around 176Mb/s). My Pi has a USB3 ethernet interface connected to my modem, and the internal interface connected to my internal GB switch. A PC connected to the internal network which accesses the internet via the Pi, when running the binary from Ookla, still gets 360Mb/s, so the Python app is still wrong..

There's an unofficial C++ version you might want to try:

Another tool you might want to try is the Measurement Lab's ndt7. They have a reference client written in go so it should be easy to compile for different targets. I have a script that runs this hourly (it sleeps for a random interval between 0 and 3600 seconds to be kind to them) and outputs json to the syslog. Since I have a syslog server and send all logs to it I can easily parse this in the future. The only thing to be aware of is that they make results publicly available for study so if you're not okay with that then this is not for you.

1 Like

In C: https://github.com/mobrembski/SpeedTestC

The advantage of running it on the router is that we can use the -I parameter to choose the interface we wanna use on the test.

Sadly it seems not supported :confused:

python speedtest-cli is a good job but when I run it on Ubuntu it always uses 1 ISP and never the other.

I'm surprised no one has made a package of this yet for OpenWRT. I've been using the Ookla version for quite awhile. But this new release of 19.07.8 Openwrt, it doesn't work now. :frowning:

It's not open sources, so we can't just compile it. Ookla needs to provide the package for us, and on most architectures :confused:

I've been using it on Ubuntu and it uses different ISP very often, so it's working fine.

Of course ping will be better. It is one less hop.

Is anyone aware that there are ARM packages of Ookla Speedtest CLI? Not sure if there any dependencies but there is just a single executable in the archive.

I've used this binary (aarch64) on an rPi 3B+ without issue...

1 Like

I would be interested getting this officially ported into OpenWrt for compiling firmware.