master
Nixellion 2020-07-09 00:28:57 +03:00
parent 0811e17a27
commit ee8df548e1
2 changed files with 12 additions and 5 deletions

View File

@ -4,7 +4,8 @@ output_txt_path: /var/www/downloads/speeds.txt
ros_dynamic_speed: True
ros_ip: 192.168.88.1
ros_queues:
- all
- WAN
- VOIP
ros_queues_except:
- dummy
ros_du_invert: False

View File

@ -248,11 +248,12 @@ def threaded_wan_speed():
if speedtest_failed:
return
time.sleep(1)
print("Allow warm-up...")
time.sleep(0.5)
print("Download warm-up...")
time.sleep(2)
uploads = []
downloads = []
print("Monitoring...")
upload_warmed_up = False
while results_dict == None:
connection = routeros_api.RouterOsApiPool(config['ros_ip'], username=secrets["ros_login"],
password=secrets["ros_password"], plaintext_login=True)
@ -268,8 +269,13 @@ def threaded_wan_speed():
downloads.append(traffic['rx-bits-per-second'])
print(f"DL: {mbits(traffic['rx-bits-per-second'])} mbps;")
else:
if upload_warmed_up:
uploads.append(traffic['tx-bits-per-second'])
print(f"UP: {mbits(traffic['tx-bits-per-second'])} mbps;")
else:
print("Upload warm-up...")
time.sleep(2)
upload_warmed_up = True
time.sleep(1)
global wan_download