fix
parent
0811e17a27
commit
ee8df548e1
|
|
@ -4,7 +4,8 @@ output_txt_path: /var/www/downloads/speeds.txt
|
||||||
ros_dynamic_speed: True
|
ros_dynamic_speed: True
|
||||||
ros_ip: 192.168.88.1
|
ros_ip: 192.168.88.1
|
||||||
ros_queues:
|
ros_queues:
|
||||||
- all
|
- WAN
|
||||||
|
- VOIP
|
||||||
ros_queues_except:
|
ros_queues_except:
|
||||||
- dummy
|
- dummy
|
||||||
ros_du_invert: False
|
ros_du_invert: False
|
||||||
|
|
|
||||||
|
|
@ -248,11 +248,12 @@ def threaded_wan_speed():
|
||||||
if speedtest_failed:
|
if speedtest_failed:
|
||||||
return
|
return
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
print("Allow warm-up...")
|
print("Download warm-up...")
|
||||||
time.sleep(0.5)
|
time.sleep(2)
|
||||||
uploads = []
|
uploads = []
|
||||||
downloads = []
|
downloads = []
|
||||||
print("Monitoring...")
|
print("Monitoring...")
|
||||||
|
upload_warmed_up = False
|
||||||
while results_dict == None:
|
while results_dict == None:
|
||||||
connection = routeros_api.RouterOsApiPool(config['ros_ip'], username=secrets["ros_login"],
|
connection = routeros_api.RouterOsApiPool(config['ros_ip'], username=secrets["ros_login"],
|
||||||
password=secrets["ros_password"], plaintext_login=True)
|
password=secrets["ros_password"], plaintext_login=True)
|
||||||
|
|
@ -268,8 +269,13 @@ def threaded_wan_speed():
|
||||||
downloads.append(traffic['rx-bits-per-second'])
|
downloads.append(traffic['rx-bits-per-second'])
|
||||||
print(f"DL: {mbits(traffic['rx-bits-per-second'])} mbps;")
|
print(f"DL: {mbits(traffic['rx-bits-per-second'])} mbps;")
|
||||||
else:
|
else:
|
||||||
uploads.append(traffic['tx-bits-per-second'])
|
if upload_warmed_up:
|
||||||
print(f"UP: {mbits(traffic['tx-bits-per-second'])} mbps;")
|
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)
|
time.sleep(1)
|
||||||
global wan_download
|
global wan_download
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue