All new accounts created on Gitlab now require administrator approval. If you invite any collaborators, please let Flux staff know so they can approve the accounts.

Commit 58f26d30 authored by Chad Barb's avatar Chad Barb

Added bandwidth.

Look at comment at beginning of wanlinksolve.cc for full documentation.

Also added -v switch to turn on verbosity (now off by default.)
parent 50109239
...@@ -6,13 +6,14 @@ use English; ...@@ -6,13 +6,14 @@ use English;
use lib '@prefix@/lib'; use lib '@prefix@/lib';
use libdb; use libdb;
my $result = DBQueryFatal("SELECT node_id1, iface1, node_id2, iface2, time " . my $result = DBQueryFatal("SELECT node_id1, iface1, node_id2, iface2, time, bandwidth " .
"FROM widearea_delays"); "FROM widearea_delays");
my %nodename = (); my %nodename = ();
my %speeds = (); my %speeds = ();
my %bws = ();
while (my ($node_id1, $iface1, $node_id2, $iface2, $time) = $result->fetchrow) { while (my ($node_id1, $iface1, $node_id2, $iface2, $time, $bw) = $result->fetchrow) {
my $msectime = $time * 1000; my $msectime = $time * 1000;
my $glom1 = $node_id1 . ":" . $iface1; my $glom1 = $node_id1 . ":" . $iface1;
my $glom2 = $node_id2 . ":" . $iface2; my $glom2 = $node_id2 . ":" . $iface2;
...@@ -22,6 +23,7 @@ while (my ($node_id1, $iface1, $node_id2, $iface2, $time) = $result->fetchrow) { ...@@ -22,6 +23,7 @@ while (my ($node_id1, $iface1, $node_id2, $iface2, $time) = $result->fetchrow) {
$nodename{ $glom2 } = "1"; $nodename{ $glom2 } = "1";
$speeds{ $glom1 . "+" . $glom2 } = $msectime; $speeds{ $glom1 . "+" . $glom2 } = $msectime;
$bws{ $glom1 . "+" . $glom2 } = $bw;
} }
print scalar( keys %nodename ) . "\n"; print scalar( keys %nodename ) . "\n";
...@@ -40,3 +42,17 @@ foreach my $i (sort (keys %nodename)) { ...@@ -40,3 +42,17 @@ foreach my $i (sort (keys %nodename)) {
} }
print "\n"; print "\n";
} }
foreach my $i (sort (keys %nodename)) {
foreach my $j (sort (keys %nodename)) {
# the following is conceptually
# the bandwidth of a machine to itself.
# using ttcp, a typical value was found to be 180 MB/sec
my $s = "180000";
if (exists $bws{ $i."+".$j } ) {
$s = $bws{ $i . "+" . $j };
}
print sprintf( "%-6i ", $s );
}
print "\n";
}
This diff is collapsed.
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