keywords: tc qdisc class queue QoS traffic control Linux HTB statistics parse graph tc-viewer
Tired of grepping tc -s class show dev eth1 output?
class htb 1:4040 parent 1:1 leaf 4040: prio 0 rate 20Kbit ceil 4Mbit burst 20Kb cburst 2Kb Sent 102216769 bytes 276604 pkts (dropped 0, overlimits 0) rate 39bit lended: 140776 borrowed: 135828 giants: 0 tokens: 6692535 ctokens: 3264 class htb 1:d049 parent 1:998 leaf d049: prio 0 rate 2Kbit ceil 3500Kbit burst 20Kb cburst 2Kb Sent 110702097 bytes 280264 pkts (dropped 0, overlimits 0) rate 146bit 2pps lended: 243112 borrowed: 37152 giants: 0 tokens: 66787740 ctokens: 3715
You're right, it SUX! Here comes the remedy: tc -s class show dev eth1 | tccs
1:2 (htb) 95Mbit 2930.7 kb/s ( 128950799 KB) 1:997 (htb) 5Mbit 32129.0 kb/s ( 290848273 KB) 1:1 (htb) 3500Kbit-4500Kbit 1496.4 kb/s ( 129468320 KB) 1:998 (htb) 1Mbit-4500Kbit 2773.8 kb/s ( 161379948 KB)
1:2 (htb) 95Mbit 3697.9 kb/s ( 129025619 KB) 1:997 (htb) 5Mbit 4865.6 kb/s ( 290940210 KB) 1:1 (htb) 3500Kbit-4500Kbit 2968.5 kb/s ( 129507129 KB) 1:1024 (htb) 20Kbit-4Mbit 42.4 kb/s ( 649276 KB) 1:1053 (htb) 20Kbit-50Kbit 1.4 kb/s ( 135856 KB) 1:1061 (htb) 20Kbit-4Mbit 61.9 kb/s ( 387984 KB) 1:1160 (htb) 20Kbit 0.0 kb/s ( 22037 KB) 1:1165 (htb) 20Kbit-50Kbit 0.3 kb/s ( 808986 KB) 1:1166 (htb) 20Kbit-4Mbit 0.1 kb/s ( 107205 KB) 1:1208 (htb) 20Kbit-4Mbit 95.5 kb/s ( 358955 KB) 1:1213 (htb) 20Kbit-50Kbit 31.6 kb/s ( 75460 KB) 1:2034 (htb) 20Kbit-4Mbit 0.0 kb/s ( 765513 KB) 1:2036 (htb) 20Kbit-50Kbit 0.0 kb/s ( 448601 KB) 1:2071 (htb) 20Kbit-4Mbit 1604.7 kb/s ( 647097 KB) 1:4002 (htb) 30Kbit-1800Kbit 9.2 kb/s ( 1188998 KB) 1:4003 (htb) 30Kbit-1800Kbit 128.9 kb/s ( 11248053 KB) 1:4018 (htb) 20Kbit 0.0 kb/s ( 130 KB) 1:998 (htb) 1Mbit-4500Kbit 2245.4 kb/s ( 161433082 KB) 1:a061 (htb) 2Kbit-3500Kbit 161.4 kb/s ( 245826 KB) 1:a111 (htb) 2Kbit-3500Kbit 131.4 kb/s ( 5206014 KB) 1:a138 (htb) 2Kbit-20Kbit 0.0 kb/s ( 884729 KB) 1:a150 (htb) 2Kbit-3500Kbit 130.5 kb/s ( 229756 KB) 1:a197 (htb) 2Kbit-20Kbit 2.3 kb/s ( 321422 KB) 1:a204 (htb) 2Kbit-3500Kbit 77.4 kb/s ( 573887 KB) 1:b013 (htb) 2Kbit-3500Kbit 251.9 kb/s ( 4541866 KB) 1:d036 (htb) 2Kbit-3500Kbit 47.8 kb/s ( 526588 KB)
1:997 (htb) 5Mbit 4603.3 kb/s ( 291230767 KB) 1:998 (htb) 1Mbit-4500Kbit 2353.2 kb/s ( 161639961 KB) 1:d028 (htb) 2Kbit-3500Kbit 2252.8 kb/s ( 3516448 KB) 1:d019 (htb) 2Kbit-3500Kbit 298.4 kb/s ( 5296464 KB) 1:b013 (htb) 2Kbit-3500Kbit 292.4 kb/s ( 4567632 KB) 1:b078 (htb) 2Kbit-3500Kbit 236.4 kb/s ( 2993181 KB) 1:d027 (htb) 2Kbit-3500Kbit 216.6 kb/s ( 3984723 KB) 1:1 (htb) 3500Kbit-4500Kbit 1835.0 kb/s ( 129590805 KB) 1:1226 (htb) 20Kbit-4Mbit 1352.9 kb/s ( 364325 KB) 1:4003 (htb) 30Kbit-1800Kbit 251.7 kb/s ( 11259672 KB) 1:2080 (htb) 20Kbit-4Mbit 221.7 kb/s ( 97231 KB) 1:4031 (htb) 20Kbit-4Mbit 155.6 kb/s ( 795890 KB) 1:1244 (htb) 20Kbit-4Mbit 147.5 kb/s ( 1908385 KB) 1:2 (htb) 95Mbit 1542.6 kb/s ( 129185963 KB)
GTS (htb) 5Mbit 4290.3 kb/s ( 291540222 KB) P2P (htb) 1Mbit-4500Kbit 2995.7 kb/s ( 161857970 KB) P2P-pc19 (htb) 2Kbit-3500Kbit 5324.8 kb/s ( 5341685 KB) P2P-pc23 (htb) 2Kbit-3500Kbit 2113.5 kb/s ( 4565516 KB) P2P-pc28 (htb) 2Kbit-3500Kbit 463.5 kb/s ( 3548987 KB) P2P-1_013 (htb) 2Kbit-3500Kbit 273.7 kb/s ( 4590991 KB) P2P-pc27 (htb) 2Kbit-3500Kbit 152.2 kb/s ( 3996055 KB) norm (htb) 3500Kbit-4500Kbit 1416.3 kb/s ( 129682250 KB) pc03 (htb) 30Kbit-1800Kbit 1548.3 kb/s ( 11271301 KB) nat1-1088 (htb) 20Kbit-4Mbit 224.3 kb/s ( 645470 KB) pc27 (htb) 20Kbit-4Mbit 179.5 kb/s ( 663931 KB) pc20 (htb) 20Kbit-4Mbit 145.5 kb/s ( 5292894 KB) nat0-163 (htb) 20Kbit-4Mbit 72.0 kb/s ( 1266607 KB) LAN (htb) 95Mbit 1302.2 kb/s ( 129286926 KB)
Maybe something like (good old postscript example): ?
tc -s class show dev eth1 | tccg -r 2 -i eth1 > eth1.dot # there are also -c and -s parameters dot -Tsvg -o eth1.svg eth1.dot; convert eth1.svg eth1.png circo -Tps -o eth0.ps eth0.dot; convert eth0.ps eth0.gif