summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2009-07-27 14:36:32 -0700
committerStephen Hemminger <stephen.hemminger@vyatta.com>2009-10-20 13:31:41 +0900
commitff81062fc74a6a06993fca95d44edaaa18279bb5 (patch)
tree165464a50c2fcc980415a15283e24c5f03433c46
parentd45b22f598646ef5d02ff8f7a26ede93d8ee67d4 (diff)
downloadvyatta-op-qos-ff81062fc74a6a06993fca95d44edaaa18279bb5.tar.gz
vyatta-op-qos-ff81062fc74a6a06993fca95d44edaaa18279bb5.zip
Sort lines in show-queuing --brief
Sort output lines Bug 3896
-rwxr-xr-xscripts/vyatta-show-queueing.pl5
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/vyatta-show-queueing.pl b/scripts/vyatta-show-queueing.pl
index 3d3239b..5dfca4b 100755
--- a/scripts/vyatta-show-queueing.pl
+++ b/scripts/vyatta-show-queueing.pl
@@ -69,12 +69,12 @@ sub show_brief {
# Read qdisc info
open( my $tc, '/sbin/tc -s qdisc ls |' ) or die 'tc command failed';
+ my @lines;
my ( $qdisc, $parent, $ifname, $id );
while (<$tc>) {
chomp;
my @fields = split;
if ( $fields[0] eq 'qdisc' ) {
-
# qdisc sfq 8003: dev eth1 root limit 127p quantum 1514b
( undef, $qdisc, $id, undef, $ifname, $parent ) = @fields;
next;
@@ -100,10 +100,11 @@ sub show_brief {
next unless ( $intf && ( $intf->type() eq $intf_type ) );
}
- printf $fmt, $ifname, shaper($qdisc), $sent, $drop, $over;
+ push @lines, sprintf $fmt, $ifname, shaper($qdisc), $sent, $drop, $over;
}
}
close $tc;
+ print sort @lines;
if (%ingress) {
print "\nInput:\n";