Commit 4ed6392e authored by Mike Hibler's avatar Mike Hibler

Print the pipe queue lengths

parent d6dfc183
......@@ -24,7 +24,7 @@ $NLIST = "/usr/testbed/bin/node_list" if ($NLIST[0] == '@');
my $ipfwpat = q(^\d+\s+(\d+)\s+(\d+) pipe (\d+) ip from any to (any|[0-9\.]+) (\S+) (\S+) (\S+));
my $ipfwpat2 = q(^\d+\s+(\d+)\s+(\d+) pipe (\d+) ip from ([0-9\.]+) to any (\S+) (\S+) (\S+));
my $pipepat1 =
q(^(\d+):\s+(unlimited|[\d\.]+ [KM]bit/s)\s+([\d\.]+) ms\s+(\d+ sl\.(?:plr [\d\.]+)?));
q(^(\d+):\s+(unlimited|[\d\.]+ [KM]bit/s)\s+([\d\.]+) ms\s+(\d+) sl\.(plr [\d\.]+)?);
my $mappat =
q(^(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\d+)\s+(\d+));
......@@ -159,6 +159,7 @@ sub printapipe($)
}
printf ", %4dms", $pipeinfo{$pipe}->{"delay"};
printf ", %4.1f%%", $pipeinfo{$pipe}->{"plr"};
printf ", %2ds", $pipeinfo{$pipe}->{"qlen"};
printf ", %10d", $pipeinfo{$pipe}->{"pkts"};
printf ", %10d", $pipeinfo{$pipe}->{"bytes"};
print "\n";
......@@ -272,14 +273,15 @@ sub parseit($)
my $pipe = int($1);
my $bw = $2;
my $delay = $3;
my $plr = $4;
my $qlen = $4;
my $plr = $5;
if ($bw =~ /(\d+.\d+) Mbit\/s/) {
$bw = $1 * 1000 * 1000;
} elsif ($bw =~ /(\d+.\d+) Kbit\/s/) {
$bw = $1 * 1000;
}
if ($plr =~ /plr (\d+\.\d+)/) {
if (defined($plr) && $plr =~ /plr (\d+\.\d+)/) {
$plr = $1 * 100.0;
} else {
$plr = 0;
......@@ -290,6 +292,7 @@ sub parseit($)
} else {
$pipeinfo{$pipe}->{"bw"} = $bw;
$pipeinfo{$pipe}->{"delay"} = $delay;
$pipeinfo{$pipe}->{"qlen"} = $qlen;
$pipeinfo{$pipe}->{"plr"} = $plr;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment