Compute / Test network speed
Test your machine's network speed
Install Speedtest by Ookla on a virtual machine, run a test against a server you choose, and read the download, upload and latency it reports.
Before you start
You run the test on the machine itself, so connect over SSH or open the serial console first. The commands use sudo, which the image's login user can run.
The machine needs to reach the internet. A new security group has a rule allowing all traffic out, so this works unless you have removed it. On a machine in a VPC, the subnet's network ACL must allow the traffic out and the replies back in.
Install Speedtest by Ookla
Speedtest by Ookla is Ookla's official command-line client, and the one these steps install. It is not the older Python speedtest-cli package in the distributions' own repositories, which is a separate, unofficial tool that conflicts with it. Don't install that one.
The same steps work on every Linux image we offer: Ubuntu 20.04, 22.04, 24.04 and 26.04 (plain or encrypted), Debian 12, Rocky Linux 8, CentOS Stream 9 and 10, and openSUSE Leap 15.5. They use Ookla's own download for 64-bit x86 Linux, which is what every Pantech machine runs.
1. Remove the old speedtest-cli
Skip this if you never installed it. If you did, remove it first:
$ sudo apt-get remove speedtest-cli$ rpm -qa | grep speedtest | xargs -I {} sudo yum -y remove {}$ sudo zypper remove speedtest-cli2. Make sure curl and tar are installed
$ sudo apt-get update$ sudo apt-get install -y curl tar$ sudo dnf install -y tarcurl comes installed on these images.
$ sudo zypper install -y curl tar3. Download and install it
On every image:
$ cd /tmp$ curl -fsSLO https://install.speedtest.net/app/cli/ookla-speedtest-1.2.0-linux-x86_64.tgz$ tar -xzf ookla-speedtest-1.2.0-linux-x86_64.tgz speedtest$ sudo install -m 755 speedtest /usr/local/bin/speedtest$ rm speedtest ookla-speedtest-1.2.0-linux-x86_64.tgz$ speedtest --versionspeedtest --version must start with Speedtest by Ookla 1.2.0 (1.2.0.84 is the current release), followed by details of the build. If it prints something else, or the command reports options it doesn't know, the old speedtest-cli is still installed: go back to step 1.
Alternative: Ookla's package repository
On the images it supports, the repository installs the same Speedtest by Ookla, and the system's updates then keep it up to date. It is optional: the download above works there too.
$ sudo apt-get update$ sudo apt-get install curl$ curl -s https://packagecloud.io/install/repositories/ookla/speedtest-cli/script.deb.sh | sudo bash$ sudo apt-get install speedtest$ curl -s https://packagecloud.io/install/repositories/ookla/speedtest-cli/script.rpm.sh | sudo bash$ sudo yum install speedtestIf you see "Unable to locate package speedtest"
You ran the repository script on an image it does not support. Remove the repository it added, then install with the download above:
$ sudo rm -f /etc/apt/sources.list.d/ookla_speedtest-cli.list$ sudo apt-get updateUntil you remove it, every sudo apt-get update also reports an error for the repository.
$ sudo rm -f /etc/yum.repos.d/ookla_speedtest-cli.repo$ sudo dnf clean all$ sudo rm -f /etc/zypp/repos.d/ookla_speedtest-cli.repo$ sudo zypper refreshRun a test
$ speedtestThe first run asks you to accept Ookla's license terms and privacy notice. To accept them without a prompt, for example in a script, pass them on the command line:
$ speedtest --accept-license --accept-gdprSpeedtest by Ookla is Ookla's software, and using it is subject to Ookla's license agreement, terms of use and privacy policy.
Choose the test server
With no options, Speedtest picks a nearby server for you. To pick one yourself, list the servers nearest the machine, then pass the ID of one in Abuja or Lagos:
$ speedtest -L$ speedtest -s <server-id>The result is a measure of the path between the machine and that server, not of the machine alone, so the server you choose changes the numbers:
- A server in Abuja or Lagos measures the machine's own connection, and what users in Nigeria get. Each machine's network is capped at 1 Gbps, so a good result there is up to about 900 Mbps: the rest goes on protocol overhead.
- A server in another country measures the international links to there. Expect lower speeds and higher latency, whatever the machine's own connection.
Run the test a few times, and against the same server when you compare results, as other traffic on the path changes them from minute to minute.
Read the result
| Line | What it means |
|---|---|
| Server | The test server, its city and its ID |
| Idle Latency | How long a round trip to the server takes when the connection is quiet, in milliseconds (ms). Lower is better. Jitter is how much that varies |
| Download | How fast the machine receives data from the server, in megabits per second (Mbps). The latency under it is measured while the download runs |
| Upload | How fast the machine sends data to the server, in Mbps |
| Packet Loss | The share of packets that never arrived. Not available when it could not be measured |
| Result URL | A link to share the result |
Speeds are in megabits per second, the unit network speeds are quoted in. Divide by 8 for megabytes per second: 800 Mbps moves about 100 MB of data a second.
For a script, speedtest -f json prints the result as JSON. There, speeds are in bytes per second: divide by 125,000 for Mbps.