Save 15% on Instant Deploy Bare-Metal Servers in 26 Global Markets with Coupon Code: EdgeSave

speedtest-cli: How to Specify a Server

You might use speedtest-cli to test your servers’ network capacity at some point. While the tool itself provides a good platform for running speed tests, sometimes the server selection that the tool provides can be less than optimal. However, you can pass the –list switch to generate a list of speedtest servers. Then, you can use the resulting server ID to target a certain speedtest server.

The following command should show the list:
curl -s https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py | python - --list | grep -i hivelocity
speedtest-cli server list

This will show a list of servers which we operate. The number on the left is the ID, which we will need to replace the ##### with. The last part of the command, grep -i hivelocity will show only the results that have Hivelocity in the name (-i makes it case insensitive). You can then use the --server switch to specify the server when running the speed test, like so:

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

The above command will run a speed test against our server in Tampa using speedtest-cli. Please note that the server ID from Speedtest.net may change, so get a new copy of the list each time.

If you would prefer not to pipe the script directly into Python, it can be downloaded as well.

wget https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py
python speedtest.py --list
python speedtest.py --server #####

If you are still not getting the results you expect, feel free to submit a ticket. Be sure to check out our other articles in the knowledgebase for more tips and tricks like this one!

The source code for speedtest-cli can be found here: https://github.com/sivel/speedtest-cli

Share on Twitter
Share on Facebook