summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2010-04-16 11:49:19 -0700
committerStephen Hemminger <stephen.hemminger@vyatta.com>2010-04-16 11:49:19 -0700
commit32356083d7f96d61cef57813cf697d5691e4855e (patch)
tree73137e94ad4bce9c867ea9514719be195202fa27
parent2bdbbee9ba21e921380ba415c1c67761c6f82c4b (diff)
parent671a8b2b64c93bc8bd0a5165d03017f968852e38 (diff)
downloadvyatta-op-qos-32356083d7f96d61cef57813cf697d5691e4855e.tar.gz
vyatta-op-qos-32356083d7f96d61cef57813cf697d5691e4855e.zip
Merge branch 'larkspur' of vm:git/vyatta-op-qos into larkspur
-rw-r--r--scripts/show-input-policy.pl11
1 files changed, 6 insertions, 5 deletions
diff --git a/scripts/show-input-policy.pl b/scripts/show-input-policy.pl
index 41ea209..98ef37f 100644
--- a/scripts/show-input-policy.pl
+++ b/scripts/show-input-policy.pl
@@ -13,12 +13,11 @@
# General Public License for more details.
#
# This code was originally developed by Vyatta, Inc.
-# Portions created by Vyatta are Copyright (C) 2007 Vyatta, Inc.
+# Copyright (C) 2010 Vyatta, Inc.
# All Rights Reserved.
#
# Author: Stephen Hemminger
-# Date: July 2008
-# Description: Script to display QoS information in pretty form
+# Description: Script to display input filter information in pretty form
#
# **** End License ****
#
@@ -112,14 +111,16 @@ sub get_filter {
sub show {
my $interface = shift;
my $filters = get_filter($interface);
- return unless $filters;
+
+ my @classes = keys %{$filters};
+ return if $#classes < 0; # no ingress
print "\n$interface input:\n";
my $fmt = "%-10s %-10s %-10s %-9s %-9s %s\n";
printf $fmt, 'Class', 'Policy', 'Received', 'Dropped', 'Overlimit', 'Rate';
- foreach my $id (sort keys %{$filters}) {
+ foreach my $id (sort @classes) {
my @args = @{$filters->{$id}};
my $class = ($id eq $INGRESS) ? 'default' : $id;
my $rate = pop @args;