https://github.com/jlmcgraw/networkUtilities/blob/master/parseMlsQosInterfaceStatistics.pl
I whipped up this perl script as part of some troubleshooting I was
doing and I'd thought I send it out to NANOG in case anyone else might
find it useful (Note that you may need to install some additional perl
libraries, see the setup.sh file in that repository for installing
them). I've only tested this with Ubuntu flavors of Linux, your OS
might not work out of the bag.
What it does is take the output of "show mls qos interface statistics",
which lists COS/DSCP/Queue counters by individual interface, from a file
and summarize all of those numbers into overall totals.
This will (theoretically) give you a more holistic view of the markings
of traffic in/out of the switch along with which queues are dropping
packets. This will hopefully assist in more intelligent allocation of
queue buffers and thresholds etc.
If you have any thoughts on improvements or bug fixes I'd love to hear them
-Jesse
Output should look something like this:
'cos:incoming ( Tag -> Packets )' => {
'0' => '13378773318',
'6' => 1192965355,
'5' => 241414642,
'7' => 93307502,
'3' => 32812572,
'1' => 705042,
'4' => 5812
},
'cos:outgoing ( Tag -> Packets )' => {
'0' => '18309565892',
'6' => 4725226136,
'7' => 2016871236,
'5' => 1937646890,
'3' => 423068898,
'2' => 41422754,
'1' => 11665393,
'4' => 567635
},
'dscp:incoming ( Tag -> Packets )' => {
'0' => '11778685571',
'46' => 2184094729,
'26' => 394305418,
'40' => 131328936,
'48' => 84660939,
'18' => 42501678,
'24' => 32812572,
'12' => 8553900,
'56' => 6240271,
'10' => 3500510,
'44' => 502413,
'34' => 463741,
'4' => 247044,
'52' => 113496,
'32' => 103896,
'28' => 29765,
'53' => 11408,
'20' => 243,
'49' => 152,
'54' => 7,
'2' => 6,
'50' => 3
},
'dscp:outgoing ( Tag -> Packets )' => {
'0' => '16977173711',
'48' => 4360459601,
'46' => 1862171624,
'26' => 390223766,
'40' => 75123620,
'18' => 41422531,
'24' => 32812591,
'56' => 9411197,
'12' => 8258740,
'10' => 3406653,
'52' => 491103,
'34' => 463739,
'44' => 351642,
'4' => 228762,
'32' => 103896,
'53' => 47290,
'28' => 32541,
'20' => 223,
'49' => 152,
'54' => 7,
'2' => 6,
'50' => 3
},
'output queues:dropped (queue - threshold)' => {
'3-3' =>
23391191,
'2-2' =>
8571412,
'2-1' =>
1729737,
'4-3' => 103134,
'2-3' => 1948,
'3-1' => 45
},
'output queues:enqueued (queue - threshold)' => {
'3-3' =>
'14238358295',
'2-3' =>
7146794945,
'4-3' =>
3298145116,
'1-3' =>
1862349561,
'2-2' =>
1078365695,
'2-1' =>
230568942,
'1-1' =>
75476596,
'4-1' =>
541520,
'3-1' => 32559
}
Processed 260 interfaces