bn302#bash Cli -p15 -c 'srnz' | awk '{print $5, $8, $1}' | sort -r | more
Mbps Kpps Port
1.6% 4.5% Et9/36/1
1.5% 4.3% Et3/36/1
0.7% 0.5% Et13/33/1
0.7% 0.4% Et12/36/2
or set it as an alias
srnzsort bash Cli -p15 -c 'srnz' | awk '{print $5, $8, $1}' | sort -r | head -n 6
Updated note: The above command works with interface names/description defined. If not, have to change awk '{print $5, $8, $1}' to awk '{print $4, $7, $1}'
hs486.11:32:15#srnz
Port Name Intvl In Mbps % In Kpps Out Mbps % Out Kpps
Et49/1 0:05 9870.4 100.0% 812 9860.3 99.9% 811
hs486.12:14:45#bash Cli -p15 -c 'srnz' | awk '{print $4, $7, $1}' | sort -r | more
In In Port
100.0% 99.9% Et50/1
100.0% 99.9% Et49/4
How about some interfaces with description, some don't? hm.... Let me think about it..... :-)
This doesn't work for me on EOS 4.20.11M. Is something missing in your command?
ReplyDeleteUpdated note: The above command works with interface names/description defined. If not, have to change awk '{print $5, $8, $1}' to awk '{print $4, $7, $1}'
ReplyDelete