Share your Pi Speedtests! [Script]

Hey folks. Share your Pi Speedtests! Let’s see who has the Pi with the fastest internet connection :wink:

Remember to remove your public IP address!

Run this command from a terminal :slight_smile: Source here! It’s 100% safe.

curl -s https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py | python -

Home Connection (100/100 connection)

Retrieving speedtest.net configuration...
Testing from ******** (130.***.***.5)...
Retrieving speedtest.net server list...
Selecting best server based on ping...
Hosted by ******** [68.38 km]: 20.971 ms
Testing download speed...........................................................
Download: 82.20 Mbit/s
Testing upload speed..............................................................
Upload: 92.61 Mbit/s

With my VPN connected via Wireguard:

Retrieving speedtest.net configuration...
Testing from ******** (185.***.***.160)...
Retrieving speedtest.net server list...
Selecting best server based on ping...
Hosted by ******** [0.23 km]: 23.456 ms
Testing download speed..................................................................
Download: 82.09 Mbit/s
Testing upload speed.....................................................................
Upload: 82.16 Mbit/s

This is why I love Wireguard. Almost no loss of speed when using it what-so-ever. I’ll edit this post later with tests using openvpn to show the difference. In the past openvpn has been much slower.

ghettopi
Nice idea, especially to compare VPN speeds.

Note (for others) that Python is required to run this script. It is Python 3 compatible, which I would then recommend:
apt install python3

Wow, thank you… very nice script :slight_smile:

Here is my results:

root@DietPi:~# python3 ./speedtest.py
Retrieving speedtest.net configuration...
Testing from CentroNet a.s. (217.***.174.***)...
Retrieving speedtest.net server list...
Selecting best server based on ping...
Hosted by JM-Net z.s. (Prague) [7.08 km]: 5.201 ms
Testing download speed................................................................................
Download: 86.03 Mbit/s
Testing upload speed......................................................................................................
Upload: 94.93 Mbit/s

Please, can I use and modify Your script to periodically measure internet speed and save it to table or DB? Thx :wink:

There are a couple of cool Grafana dashboards arevailable. Maybe you like to have a look to this one https://github.com/psilvaazevedo/TICK-Speedtest-Grafana

Grafana + InfluxDB are available via DietPi software

Thanks for the script, it’s real useful.

But by God does it feel bad:

Retrieving speedtest.net configuration...
Testing from ********** Private Limited (103.**.***.62)...
Retrieving speedtest.net server list...
Selecting best server based on ping...
Hosted by ******** Pvt. Ltd. (******) [17.20 km]: 114.497 ms
Testing download speed................................................................................
Download: 9.21 Mbit/s
Testing upload speed................................................................................................
Upload: 10.09 Mbit/s

Perhaps one day I’ll get the same speeds as the ones I read here :smiley:

ON ATT Residential Fiber 1000/1000
RPi4 plugged into a mesh satellite. I’ll have to move it to the router and test it!

Retrieving speedtest.net configuration…
Testing from AT&T U-verse (xxxx)…
Retrieving speedtest.net server list…
Selecting best server based on ping…
Hosted by XXX [8.22 km]: 12.714 ms
Testing download speed…
Download: 415.94 Mbit/s
Testing upload speed…
Upload: 236.04 Mbit/s

I’ll share mine. Twisted pair goes to the next ISP’s node. The node itself is connected by fiber. All network is approximately 10 years old.
11$ or 9€ per month including IP TV. ISP offers 500 Mb/s down. Real speed varies from 350 to 600 Mb/s.

Hosted by () [0.39 km]: 4.443 ms
Testing download speed................................................................................
Download: 612.03 Mbit/s
Testing upload speed......................................................................................................
Upload: 168.21 Mbit/s

VPN connection cuts a lot (node is located in different country).

Hosted by () [1.14 km]: 72.914 ms
Testing download speed................................................................................
Download: 137.07 Mbit/s
Testing upload speed......................................................................................................
Upload: 125.05 Mbit/s

puh I’m living on one of Europe’s capital cities but my internet connection feels like stone age with a 4 times higher price tag :cry:

Hi guys, I’m noob, how can I create this script to automatically run on dietpi in 1 in 1 hour? thanks

Best to follow installation instructions of the script owner https://www.speedtest.net/de/apps/cli

I’m on a cable plan with ISP modem and OpenWRT router… I thought it was normal for upload speeds that low.

dietpi@rpi4:~ $ curl -s https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py | python3 -
Retrieving speedtest.net configuration...
Testing from Spectrum (xxxx)...
Retrieving speedtest.net server list...
Selecting best server based on ping...
Hosted by XXXX [17.66 km]: 26.086 ms
Testing download speed................................................................................
Download: 147.49 Mbit/s
Testing upload speed......................................................................................................
Upload: 9.10 Mbit/s

PING ms
15
DOWNLOAD Mbps
463.18
UPLOAD Mbps
8.40
XFINITY
Kingwood, TX

I’m not sure that the script is a good choice to measure internet speed. I’m getting quite some different values if I compare speedtest.net Python script with their own WebSite.

Both test targeted the same test server

root@DietPiProd:~# curl -s https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py | python3 -
Retrieving speedtest.net configuration...
Testing from xxx (x.x.x.x)...
Retrieving speedtest.net server list...
Selecting best server based on ping...
Hosted by xxx (xxx) [93.14 km]: 558.364 ms
Testing download speed................................................................................
Download: 5.60 Mbit/s
Testing upload speed......................................................................................................
Upload: 10.87 Mbit/s
root@DietPiProd:~#

picture.png

Same here - the py script gives very inconsistent results. If I use the CLI Speedtest app directly, I get what I’m expecting to see:

dietpi@DevPi:~ $ /mnt/dietpi_nfs/speedtest/ARM/speedtest

Speedtest by Ookla

Server: Community Fibre Limited - London (id = 30690)
ISP:
Latency: 5.20 ms (0.03 ms jitter)
Download: 917.18 Mbps (data used: 552.6 MB)
Upload: 935.13 Mbps (data used: 677.9 MB)
Packet Loss: Not available.

I’m getting the following:

Testing from Clouvider Limited (1**.1**.2***.9*)…
Retrieving speedtest.net server list…
Selecting best server based on ping…
Hosted by Internet Central Limited (Keele) [223.28 km]: 19.414 ms
Testing download speed…
Download: 70.91 Mbit/s
Testing upload speed…
Upload: 25.23 Mbit/s

Bit disappointed as I have a full fibre 300Mps connection. Am going over Nord VPN, but get way way higher than that on my Mac

the python script is not a real good tool to measure your internet speed as you can see above on the discussion. Quite some difference on speed
detection.

1 Like

Just revisiting some old posts of mine…

Did a speedtest via the Speedtest website via the Firefox browser. My 300Mbps full fibre connection was getting 91Mbps on the Pi. I am connecting via Nord, but when I do the same test on my Mac (via Nord) I get 125Mbps - 25% reduction

speedtest is not a reliable tool. It depends on your SBC device as well as on the speedtest server used.