https://github.com/goncalossilva/betterspeedtest
Tests the speed and latency of an internet connection.
https://github.com/goncalossilva/betterspeedtest
Last synced: about 2 months ago
JSON representation
Tests the speed and latency of an internet connection.
- Host: GitHub
- URL: https://github.com/goncalossilva/betterspeedtest
- Owner: goncalossilva
- License: gpl-2.0
- Created: 2021-06-24T23:51:35.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-07-11T02:34:48.000Z (almost 4 years ago)
- Last Synced: 2025-02-25T11:07:28.337Z (2 months ago)
- Language: Shell
- Homepage:
- Size: 39.1 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# betterspeedtest
Tests the performance of an internet connection by measuring download and upload speeds, as well as latency while idle, downloading, and uploading. Relies on [`netperf`](https://github.com/HewlettPackard/netperf) and `ping`.
## Usage
`betterspeedtest.sh [-4 -6] [ -H netperf-server(s) ] [ -t duration ] [ -p host-to-ping ] [ -n streams ] [ -o format ] [--idle --download --upload]`
Options:
- `-H`, `--hosts`: Comma-separated addresses of netperf servers (default: netperf.bufferbloat.net). Alternate servers include netperf-east.bufferbloat.net (east coast US), netperf-west.bufferbloat.net (California), and netperf-eu.bufferbloat.net (Denmark).
- `-4`, `-6`: Enable ipv4 or ipv6 testing (default: ipv4).
- `-t`, `--time`: Duration for how long each direction's test should run (default: 60 seconds).
- `-p`, `--ping`: Host to ping to measure latency (default: gstatic.com).
- `-n`, `--number`: Number of simultaneous sessions per host (default: 5 sessions)
- `-o`, `--format`: Output format (default: plain). Available options are `plain`, `yaml` or `prometheus`.
- `--idle`: Only measure idle latency.
- `--download`: Only measure download speed and latency.
- `--upload`: Only measure upload speed and latency.### Dockerfile
A containerized version can be built using `Dockerfile`, and ran like so:
`docker run betterspeedtest -H netperf-eu.bufferbloat.net -t 15`
#### Webserver
Within the containerized version there is a simple netcat server that tests the performance on demand. It can be started like so:
`docker run --entrypoint /app/webserver.sh betterspeedtest -H netperf-eu.bufferbloat.net -t 15`
## Acknowledgements
This is a heavily modified copy of [richb-hanover/OpenWrtScripts's betterspeedtest.sh](https://github.com/richb-hanover/OpenWrtScripts/blob/master/betterspeedtest.sh).