mirror of
https://github.com/LibreQoE/LibreQoS.git
synced 2025-02-25 18:55:32 -06:00
This commit is contained in:
parent
5f492c3716
commit
0541ba2617
@ -116,7 +116,7 @@ def printCircuitClassInfo(ipAddress):
|
|||||||
qDiscID = circuit['qdisc']
|
qDiscID = circuit['qdisc']
|
||||||
foundQdisc = True
|
foundQdisc = True
|
||||||
if foundQdisc:
|
if foundQdisc:
|
||||||
print("qDisc ID for IP " + ipAddress + " is " + qDiscID)
|
print("IP: " + ipAddress + " | Class ID: " + qDiscID)
|
||||||
print()
|
print()
|
||||||
theClassID = ''
|
theClassID = ''
|
||||||
interfaces = [interfaceA, interfaceB]
|
interfaces = [interfaceA, interfaceB]
|
||||||
@ -124,24 +124,26 @@ def printCircuitClassInfo(ipAddress):
|
|||||||
downloadMax = ''
|
downloadMax = ''
|
||||||
uploadMin = ''
|
uploadMin = ''
|
||||||
uploadMax = ''
|
uploadMax = ''
|
||||||
|
cburst = ''
|
||||||
|
burst = ''
|
||||||
for interface in interfaces:
|
for interface in interfaces:
|
||||||
command = 'tc class show dev ' + interface + ' classid ' + qDiscID
|
command = 'tc class show dev ' + interface + ' classid ' + qDiscID
|
||||||
commands = command.split(' ')
|
commands = command.split(' ')
|
||||||
proc = subprocess.Popen(commands, stdout=subprocess.PIPE)
|
proc = subprocess.Popen(commands, stdout=subprocess.PIPE)
|
||||||
for line in io.TextIOWrapper(proc.stdout, encoding="utf-8"): # or another encoding
|
for line in io.TextIOWrapper(proc.stdout, encoding="utf-8"): # or another encoding
|
||||||
print(line)
|
|
||||||
if "htb" in line:
|
if "htb" in line:
|
||||||
listOfThings = line.split(" ")
|
listOfThings = line.split(" ")
|
||||||
if interface == interfaceA:
|
if interface == interfaceA:
|
||||||
downloadMin = listOfThings[10]#.replace("Mbps","")
|
downloadMin = line.split(' rate ')[1].split(' ')[0]
|
||||||
downloadMax = listOfThings[12]#.replace("Mbps","")
|
downloadMax = line.split(' ceil ')[1].split(' ')[0]
|
||||||
|
burst = line.split(' burst ')[1].split(' ')[0]
|
||||||
|
cburst = line.split(' cburst ')[1].replace('\n','')
|
||||||
else:
|
else:
|
||||||
uploadMin = listOfThings[10]#.replace("Mbps","")
|
uploadMin = line.split(' rate ')[1].split(' ')[0]
|
||||||
uploadMax = listOfThings[12]#.replace("Mbps","")
|
uploadMax = line.split(' ceil ')[1].split(' ')[0]
|
||||||
print("Download rate/min: " + downloadMin)
|
print("Download rate/ceil: " + downloadMin + "/" + downloadMax)
|
||||||
print("Download ceil/max: " + downloadMax)
|
print("Upload rate/ceil: " + uploadMin + "/" + uploadMax)
|
||||||
print("Upload rate/min: " + uploadMin)
|
print("burst/cburst: " + burst + "/" + cburst)
|
||||||
print("Upload ceil/max: " + uploadMax)
|
|
||||||
else:
|
else:
|
||||||
print("Invalid IP address provided")
|
print("Invalid IP address provided")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user