LinuxCommandLibrary

speedtest-rs

Measure internet connection speed

TLDR

Run a full speed test (download and upload)

$ speedtest-rs
copy

Display a list of speedtest.net servers sorted by distance
$ speedtest-rs --list
copy

Run a download test only
$ speedtest-rs --no-upload
copy

Run an upload test only
$ speedtest-rs --no-download
copy

Generate a shareable link to the test results image
$ speedtest-rs --share
copy

Display basic output information only
$ speedtest-rs --simple
copy

SYNOPSIS

speedtest-rs [OPTIONS]

PARAMETERS

-l, --list
    Lists available Speedtest.net servers along with their unique IDs and approximate locations. This helps in selecting a specific server for testing.

-s, --server <ID>
    Specifies a particular server to use for the speed test by its numerical ID. Obtain IDs using the --list option.

-p, --precision <INT>
    Sets the number of decimal places for speed results, defaulting to 2. For example, -p 4 for higher precision.

-u, --units <UNIT>
    Defines the units for speed results. Accepts values like bits, bytes, kbps, mbps, gbps, or auto (default).

-f, --format <FORMAT>
    Specifies the output format of the results. Options include human (default for readability), json (for programmatic parsing), and csv (for spreadsheet integration).

-n, --no-download
    Skips the download speed test, performing only ping and upload tests. Useful for targeted testing.

-o, --no-upload
    Skips the upload speed test, performing only ping and download tests. Useful for targeted testing.

-v, --verbose
    Enables verbose output, showing more details about the testing process, including server selection and progress.

-h, --help
    Displays a help message with available options and usage information for speedtest-rs.

-V, --version
    Prints the current version number of speedtest-rs.

DESCRIPTION

speedtest-rs is a lightweight, Rust-based command-line utility for testing internet connection speed. It leverages the Speedtest.net infrastructure to accurately measure download speed, upload speed, and ping latency. Designed for simplicity and efficiency, it provides clear, concise results directly in the terminal, making it an excellent tool for network diagnostics, automation, or performance monitoring without relying on a web browser. It offers various customization options including server selection, output format (human-readable, JSON, CSV), and result precision. This tool serves as a modern, efficient, and often faster alternative to other command-line speed test clients.

CAVEATS

speedtest-rs relies on external Speedtest.net servers, meaning results can be influenced by factors such as server load, network congestion outside your local network, and geographic distance to the chosen server. It is an unofficial client, so its behavior and accuracy might occasionally differ from the official Speedtest.net website or applications. For consistent and reliable results, it's recommended to select a nearby and less congested server using the --list and --server options.

INSTALLATION

speedtest-rs can typically be installed via Cargo (Rust's package manager) using the command cargo install speedtest-rs. It might also be available in specific Linux distribution repositories or as pre-compiled binaries.

USAGE SCENARIOS

Beyond simple one-off speed checks, speedtest-rs is highly valuable for scripting network monitoring, verifying Internet Service Provider (ISP) performance agreements, and diagnosing network slowdowns over time. Its --format json or --format csv options are particularly useful for programmatic parsing and integration into larger monitoring systems or data analysis tools.

HISTORY

speedtest-rs emerged as a modern, Rust-based command-line client for Speedtest.net, providing an efficient alternative to existing solutions like the Python-based speedtest-cli. Its development leveraged Rust's strengths in performance, concurrency, and memory safety, aiming for a lightweight and robust tool. It quickly gained popularity among developers and system administrators seeking a native and fast way to test internet speeds directly from their terminals, integrating well into scripts and automated workflows.

SEE ALSO

ping(8), curl(1), iperf3(1)

Copied to clipboard