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@";
"create_image" => "$TB/bin/create_image",
"node_admin" => "$TB/bin/node_admin",
"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
......
......@@ -16,7 +16,8 @@ BIN_STUFF = power snmpit tbend tbswapin tbswapout tbprerun tbreport \
portstats
# 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 \
batch_daemon exports_setup reload_daemon sched_reserve \
......
......@@ -22,14 +22,23 @@ use Getopt::Long;
use strict;
sub usage {
print "Usage: $0 [-h] <pid> <eid> [vname ...] [vname:port ...]\n\n";
print "If only pid and eid are given, prints out information about all\n";
print "ports in the experiment. Otherwise, output is limited to the\n";
print "nodes and/or ports given.\n";
print "\n";
print "-h This message\n";
print "-e Show only error counters\n";
print "-a Show all stats\n";
print << "END";
Usage: $0 [-h] <pid> <eid> [vname ...] [vname:port ...]
-h This message
-e Show only error counters
-a Show all stats
If only pid and eid are given, prints out information about all ports in the
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;
}
......
......@@ -26,7 +26,8 @@ my $TB = "@prefix@";
"create_image" => "$TB/bin/create_image",
"node_admin" => "$TB/bin/node_admin",
"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
......
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