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

Minor changes to speed up console line resetting. Generate a single

list of nodes for console_setup to avoid an ssh per node. Change the
sleep(1) in console_setup.proxy to a select(,,,0.25). Looks to be
about .25 seconds per node now, plus a constant time of 1.5 seconds.
parent 8875b213
......@@ -92,23 +92,25 @@ $cmd = "unlock tables";
$sth = $dbh->query($cmd)
|| die("Locking error:\n$cmd\nError string is:".$dbh->errstr."\n");
my @sharks=();
if (!$error && @nodes) {
foreach $n ( @nodes ) {
if ($n =~ /(sh\d+)/) {
# Its a shark - do the shelf if it hasn't been done yet
my $shelf = $1;
if (!(join(",",@sharks) =~ /\b$shelf\b/)) {
push (@sharks,$shelf);
system("$consetup $shelf") == 0 or
print STDERR "WARNING: $consetup $shelf failed!\n";
}
} else {
system("$consetup $n") == 0 or
print STDERR "WARNING: $consetup $n failed!\n";
my @conlist=();
my @sharks=();
foreach $n ( @nodes ) {
if ($n =~ /(sh\d+)/) {
# Its a shark - do the shelf if it hasn't been done yet
my $shelf = $1;
if (!(join(",",@sharks) =~ /\b$shelf\b/)) {
push(@sharks,$shelf);
push(@conlist,$shelf);
}
}
else {
push(@conlist,$n);
}
}
}
system("$consetup @conlist") == 0 or
print STDERR "WARNING: $consetup @conlist failed!\n";
}
exit($error);
......@@ -209,21 +209,26 @@ if ( @reloaded > 0 ) {
|| die("Locking error:\n$cmd\nError string is:".$dbh->errstr."\n");
}
my @sharks=();
foreach $n ( @freed_nodes ) {
if ($n =~ /(sh\d+)/) {
# Its a shark - do the shelf if it hasn't been done yet
my $shelf = $1;
if (!(join(",",@sharks) =~ /\b$shelf\b/)) {
push (@sharks,$shelf);
system("$consetup $shelf") == 0 or
print STDERR "WARNING: $consetup $shelf failed!\n";
if (@freed_nodes) {
my @conlist=();
my @sharks=();
foreach $n ( @freed_nodes ) {
if ($n =~ /(sh\d+)/) {
# Its a shark - do the shelf if it hasn't been done yet
my $shelf = $1;
if (!(join(",",@sharks) =~ /\b$shelf\b/)) {
push(@sharks,$shelf);
push(@conlist,$shelf);
}
}
else {
push(@conlist,$n);
}
}
} else {
system("$consetup $n") == 0 or
print STDERR "WARNING: $consetup $n failed!\n";
}
system("$consetup @conlist") == 0 or
print STDERR "WARNING: $consetup @conlist failed!\n";
}
exit($error);
......@@ -100,7 +100,8 @@ foreach my $node ( keys %nodepid ) {
kill('USR1', $procid) or
die("Could not signal(USR1) process $procid for log $filename");
# Give capture the chance to react.
sleep(1);
# Don't use sleep cause 1 second too long wait when doing 25 nodes!
select(undef, undef, undef, 0.2);
#
# If the file does not exist, touch it. We have this problem with
......
......@@ -100,7 +100,8 @@ foreach my $node ( keys %nodepid ) {
kill('USR1', $procid) or
die("Could not signal(USR1) process $procid for log $filename");
# Give capture the chance to react.
sleep(1);
# Don't use sleep cause 1 second too long wait when doing 25 nodes!
select(undef, undef, undef, 0.2);
#
# If the file does not exist, touch it. We have this problem with
......
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