Commit 9f1671b5 authored by Robert Ricci's avatar Robert Ricci

Make portstats runnable from ops, so that all users can use it.

Also improved the usage message.
parent 3274e602
...@@ -26,7 +26,8 @@ my $TB = "@prefix@"; ...@@ -26,7 +26,8 @@ my $TB = "@prefix@";
"create_image" => "$TB/bin/create_image", "create_image" => "$TB/bin/create_image",
"node_admin" => "$TB/bin/node_admin", "node_admin" => "$TB/bin/node_admin",
"delay_config" => "$TB/bin/delay_config", "delay_config" => "$TB/bin/delay_config",
"savelogs" => "$TB/bin/savelogs" "savelogs" => "$TB/bin/savelogs",
"portstats" => "$TB/bin/portstats"
); );
# Need to provide a simple path, because some scripts we call need one # Need to provide a simple path, because some scripts we call need one
......
...@@ -16,7 +16,8 @@ BIN_STUFF = power snmpit tbend tbswapin tbswapout tbprerun tbreport \ ...@@ -16,7 +16,8 @@ BIN_STUFF = power snmpit tbend tbswapin tbswapout tbprerun tbreport \
portstats portstats
# Stuff that mere users get on plastic. # Stuff that mere users get on plastic.
USERBINS = os_load node_reboot nscheck node_update savelogs node_control USERBINS = os_load node_reboot nscheck node_update savelogs \
node_control portstats
SBIN_STUFF = resetvlans console_setup.proxy sched_reload named_setup \ SBIN_STUFF = resetvlans console_setup.proxy sched_reload named_setup \
batch_daemon exports_setup reload_daemon sched_reserve \ batch_daemon exports_setup reload_daemon sched_reserve \
......
...@@ -22,14 +22,23 @@ use Getopt::Long; ...@@ -22,14 +22,23 @@ use Getopt::Long;
use strict; use strict;
sub usage { sub usage {
print "Usage: $0 [-h] <pid> <eid> [vname ...] [vname:port ...]\n\n"; print << "END";
print "If only pid and eid are given, prints out information about all\n"; Usage: $0 [-h] <pid> <eid> [vname ...] [vname:port ...]
print "ports in the experiment. Otherwise, output is limited to the\n"; -h This message
print "nodes and/or ports given.\n"; -e Show only error counters
print "\n"; -a Show all stats
print "-h This message\n";
print "-e Show only error counters\n"; If only pid and eid are given, prints out information about all ports in the
print "-a Show all stats\n"; experiment. Otherwise, output is limited to the nodes and/or ports given.
NOTE: Statistics are reported from the switch's perspective. This means that
'In' packets are those sent FROM the node, and 'Out' packets are those
sent TO the node.
In the output, packets described as 'NUnicast' or 'NUcast' are non-unicast
(broadcast or multicast) packets.
END
return 1; return 1;
} }
......
...@@ -26,7 +26,8 @@ my $TB = "@prefix@"; ...@@ -26,7 +26,8 @@ my $TB = "@prefix@";
"create_image" => "$TB/bin/create_image", "create_image" => "$TB/bin/create_image",
"node_admin" => "$TB/bin/node_admin", "node_admin" => "$TB/bin/node_admin",
"delay_config" => "$TB/bin/delay_config", "delay_config" => "$TB/bin/delay_config",
"savelogs" => "$TB/bin/savelogs" "savelogs" => "$TB/bin/savelogs",
"portstats" => "$TB/bin/portstats"
); );
# Need to provide a simple path, because some scripts we call need one # Need to provide a simple path, because some scripts we call need one
......
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