Live data from Hacker News

Run an Internet Speed Test from the Command Line

putorius.net

1–10 of 49 posts

Re: Run an Internet Speed Test from the Command Line

#4
post #3

For those who are more familiar with npm, there are two packages for this by Sindre Sorhus. You can run them without preinstalling them with npx, if you wish: npx speed-test npx fast-cli The second one uses fast.com

Also speedtest-net is a great one, it also has an programmatic API.

Re: Run an Internet Speed Test from the Command Line

#5
there is a standard package available in the debian repository

apt install speedtest-cli

Description: Command line interface for testing internet bandwidth using speedtest.net Speedtest.net is a webservice that allows you to test your broadband connection by downloading a file from one of many Speedtest.net servers from around the world. . This utility allows you to use the Speedtest.net service from the command line. . Note: This tool accesses speedtest.net over http, while the web-based client uses websockets. This tool has shown to become increasingly inacurate with high-speed connections. For more information, see the readme on: https://github.com/sivel/speedtest-cli

Re: Run an Internet Speed Test from the Command Line

#6
post #5

there is a standard package available in the debian repository apt install speedtest-cli Description: Command line interface for testing internet bandwidth using speedtest.net Speedtest.net is a webservice that allows you to test your broadband connection by downloading a file from one of many Speedtest.net servers from around the world. . This utility allows you to use the Speedtest.net service from the command line…

Might concern some users:

I had an issue on my 250/250Mbps-line using speedtest-cli in that it showed the correct download speed, but only 4Mbps upload.

Googling suggests it could be an issue with slow CPU/low RAM.

My (now old) server was by no means a beast as it had a throttled i3-3220T with 8GB RAM, but it should be plenty fast for that task.

The solution I came across on reddit/stack was to use this [0] instead, which solved the discrepancy for me:

[0] https://github.com/taganaka/SpeedTest

Re: Run an Internet Speed Test from the Command Line

#7
maybe it's not as accurate, but on a lot of systems where wget is already installed one can do with a lot less hassle:

wget -O /dev/null http://speedtest-ams2.digitalocean.com/100mb.test

Nota bene:

- change the datacenter to a closer one when appropriate.

- Unit is MB/s, rather than Mb/s, which is more common for this kind of test

Re: Run an Internet Speed Test from the Command Line

#8
post #6
post #5

there is a standard package available in the debian repository apt install speedtest-cli Description: Command line interface for testing internet bandwidth using speedtest.net Speedtest.net is a webservice that allows you to test your broadband connection by downloading a file from one of many Speedtest.net servers from around the world. . This utility allows you to use the Speedtest.net service from the command line…

Might concern some users: I had an issue on my 250/250Mbps-line using speedtest-cli in that it showed the correct download speed, but only 4Mbps upload. Googling suggests it could be an issue with slow CPU/low RAM. My (now old) server was by no means a beast as it had a throttled i3-3220T with 8GB RAM, but it should be plenty fast for that task. The solution I came across on reddit/stack was to use this [0] instead,…

Indeed, my own raspberry pi was returning weird results with the python-based one; I switched to this one and it is more consistent. I had to add an "--output json" option to it to not have to redo all my tooling around tracking the speedtest results, but forgot to make a pull request to the repo, and I've just done that: same json format as the python-based version.

Re: Run an Internet Speed Test from the Command Line

#9
post #8
post #6

Earlier quoted context omitted.

Might concern some users: I had an issue on my 250/250Mbps-line using speedtest-cli in that it showed the correct download speed, but only 4Mbps upload. Googling suggests it could be an issue with slow CPU/low RAM. My (now old) server was by no means a beast as it had a throttled i3-3220T with 8GB RAM, but it should be plenty fast for that task. The solution I came across on reddit/stack was to use this [0] instead,…

Indeed, my own raspberry pi was returning weird results with the python-based one; I switched to this one and it is more consistent. I had to add an "--output json" option to it to not have to redo all my tooling around tracking the speedtest results, but forgot to make a pull request to the repo, and I've just done that: same json format as the python-based version.

Thank you! You're awesome!

I used to use speedtest-cli to monitor my Internet speed regularly, in fact every 5 minutes, while also logging DOCSIS signal levels, when debugging connection issues.

It didn't give accurate results, and that caused problems for me.

I wanted to switch to the C++ version, but needed the JSON output to be able to log the data and analyze it.

Post reply on HN