Run network speed test scripts from: https://github.com/juanluisbaptiste/network-tests
2.1K
Collection of python scripts to do multiple network tests like download/upload speeds and network latency (ping). It also calculates statistics like averages, medians, min and max values and store results in a CSV file.
The scripts have the following features:
See the other README files for examples and usage instructions.
Script for doing ping tests to a list of sites on a file and optionally save results on a csv file.
Script for doing download speed tests and optionally save results on a csv file.
Script for doing upload speed tests and optionally save results on a csv file.
git clone https://github.com/juanluisbaptiste/network-tests.git
cd network-tests
sudo python setup.py install
See each script README file for detailed instructions.
There is a docker image available to run the scripts. The tests scripts to run can be driven by the following environment variables (refer to each test program for the usage description of each variable):
To enable each of the tests (these are also the defaults):
Download test configuration:
Upload test configuration:
Ping test configuration:
Global options:
There's an example env file you can use with the included docker-compose file.
Test execution can be automated:
CRON_EXPRESSION: If a cron expression is set then automated reports will be run at the specified time. This is the default. For example, the following setting will run the tests the first day of each month past midnight:
CRON_EXPRESSION="5 0 1 \* \*"
Allo those environment variables are passed to a script called /run_test.sh, which you can also call from outside the container if you want to do a manual run instead:
sudo docker-compose tests /run_test.sh
And the tests will be run as configured on the .env file.
It also includes throttle, so different network conditions can be emulated while testing. To launch it:
sudo modprobe ifb numifbs=1
sudo docker pull juanluisbaptiste/network-tests
sudo docker run -ti --cap-add NET_ADMIN --name network-tests juanluisbaptiste/network-tests bash
These environment variables controls bandwidth throttling:
If you are not using the docker image, before running the tests enable throttle with the desired network speed configuration:
throttle --profile 3g
See throttle's documentation for details on how to use it. when you finish testing you can disable it:
throttle --stop
If you want the csv file to be sent to you be email then configure these environment variables:
Content type
Image
Digest
Size
108.7 MB
Last updated
over 7 years ago
docker pull juanluisbaptiste/network-tests