Commit 4cc199f1 authored by Mac Newbold's avatar Mac Newbold
Browse files

Fix small bug with clearing swap request counter when an expt appears to

have gone active again. If you gave it a higher time than the default, and
an idle expt hadn't been idle that long, it would clear the counter when
it shouldn't, making idle expts look like they may have gone active again.
(It didn't ever change any slothd data or cause any activity, you'd just
"forget" that you'd already been sending swap requests. And it only had an
effect when you picked times _higher_ than the default idle time.)
parent 2a977df3
......@@ -46,6 +46,8 @@ Activity does not currently include:
);
}
my $defidlehours = 2;
print "Got ARGV = ",join(" ",@ARGV),"\n" if $d > 1;
my %args = ();
......@@ -72,7 +74,7 @@ if (($UID != 0) && (!TBAdmin($UID))) {
}
# Configurable parameters
my $idlehours = $t || 2;
my $idlehours = $t || $defidlehours;
my $minpph = $p || 1; # Min packets per hour a non-idle interface sends/rcvs
my $stalemin = $f || 65; # Max minutes of staleness for latest report
......@@ -217,7 +219,8 @@ while(@r=$result->fetchrow()) {
}
print $result->as_string() if ($d>1);
if (@list > 0) {
if (($idlehours==$defidlehours) && (@list > 0)) {
# Don't clear flags when we're using a time other than the normal one
$cmd = "update experiments set swap_requests=0 where not (".
join(" or ",@list).")";
print "Sending cmd:\n$cmd\n" if $d>1;
......
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