Commit c786bb4c authored by Leigh B. Stoller's avatar Leigh B. Stoller

Add rather silly option to remove the boss node from the phys listing;

used when the virtual topology does not include any link to the
testbed, but consists only of remote links.
parent b8a63e6d
......@@ -10,13 +10,14 @@ use Getopt::Std;
sub usage()
{
print STDOUT
"Usage: wanlinkinfo [-d] [-m] [-b] [-l]\n".
"Usage: wanlinkinfo [-d] [-m] [-b] [-l] [-r]\n".
" Use -m to output virtual node counts per phys node.\n".
" Use -b to output bandwidth matrix.\n".
" Use -r to remove boss from matrix.\n".
" Use -l to use the latest data instead of aged data.\n";
exit(-1);
}
my $optlist = "dmbl";
my $optlist = "dmblr";
#
# Configure variables
......@@ -35,6 +36,7 @@ my $debug = 0;
my $dobw = 0;
my $dovirt = 0;
my $dolatest = 0;
my $noboss = 0;
#
# Turn off line buffering on output
......@@ -68,11 +70,16 @@ if (defined($options{"b"})) {
if (defined($options{"l"})) {
$dolatest= 1;
}
if (defined($options{"r"})) {
$noboss = 1;
}
my $result =
DBQueryFatal("SELECT node_id1,iface1,node_id2,iface2,time,bandwidth " .
"FROM " .
($dolatest ? "widearea_recent" : "widearea_delays"));
($dolatest ? "widearea_recent " : "widearea_delays ") .
($noboss ? "where node_id1!='boss' and ".
" node_id2!='boss'" : ""));
my %nodename = ();
my %speeds = ();
......
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