EdgeOS Throughput Measurement Tools
Python scripts for measuring throughput on Ubiquiti routers (running EdgeOS).
NOTE: This script does not perform a speedtest, it returns the throughput of the router which is how much data is moving up or down through the router at that time.
There are two versions of the script one that runs once (throughput.py) and one that runs until stopped (throughput_loop.py).
These scripts require the paramiko python module for ssh.
pip install paramiko
The scripts require 5 values to be set before the script can be used:
- Set the name of the interface you want to monitor: erinterface = "eth0 "
- Set the time between the 1st and 2nd measurement: sleeptime = 0
- Set the username of the router: user = "username"
- Set the password of the router: passw = "password"
- Set the IP of the router: routerip = "192.168.1.1"
The loop script also requires the time between loops: cycletime = 30
Single Run Script (throughput.py)
Loop Script (throughput_loop.py)
Copyright (c) 2019 Conor Walsh
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.