From 9f1671b556f9270d6215854f6ca729fdcaa3a91d Mon Sep 17 00:00:00 2001 From: Robert Ricci Date: Sat, 9 Mar 2002 00:04:55 +0000 Subject: [PATCH] Make portstats runnable from ops, so that all users can use it. Also improved the usage message. --- security/paperbag.in | 3 ++- tbsetup/GNUmakefile.in | 3 ++- tbsetup/portstats.in | 25 +++++++++++++++++-------- xmlrpc/xmlrpcbag.in | 3 ++- 4 files changed, 23 insertions(+), 11 deletions(-) diff --git a/security/paperbag.in b/security/paperbag.in index f4158a466..a85b41193 100755 --- a/security/paperbag.in +++ b/security/paperbag.in @@ -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 diff --git a/tbsetup/GNUmakefile.in b/tbsetup/GNUmakefile.in index 98212b45d..3419f5897 100644 --- a/tbsetup/GNUmakefile.in +++ b/tbsetup/GNUmakefile.in @@ -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 \ diff --git a/tbsetup/portstats.in b/tbsetup/portstats.in index eb2516adf..7c25b87f0 100755 --- a/tbsetup/portstats.in +++ b/tbsetup/portstats.in @@ -22,14 +22,23 @@ use Getopt::Long; use strict; sub usage { - print "Usage: $0 [-h] [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] [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; } diff --git a/xmlrpc/xmlrpcbag.in b/xmlrpc/xmlrpcbag.in index f4158a466..a85b41193 100755 --- a/xmlrpc/xmlrpcbag.in +++ b/xmlrpc/xmlrpcbag.in @@ -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 -- GitLab