Commit dc6c65cb authored by David Johnson's avatar David Johnson
Browse files

Missed a couple things in the conversion.

parent bcabe386
...@@ -193,6 +193,7 @@ my $JITTER_DEDUCTION_FACTOR = 0.015; ...@@ -193,6 +193,7 @@ my $JITTER_DEDUCTION_FACTOR = 0.015;
# increasing order of unavailability (so that the most avail are first). # increasing order of unavailability (so that the most avail are first).
# #
# Arguments: # Arguments:
# $0 = name of plc.
# $1 = a ref to a hash returned by getNodeHistSequences; if undef, this # $1 = a ref to a hash returned by getNodeHistSequences; if undef, this
# function will call getNodeHistSequences. # function will call getNodeHistSequences.
# $2 = boolean; if !0, will increase unavailability rank for a node if it is # $2 = boolean; if !0, will increase unavailability rank for a node if it is
...@@ -201,9 +202,14 @@ my $JITTER_DEDUCTION_FACTOR = 0.015; ...@@ -201,9 +202,14 @@ my $JITTER_DEDUCTION_FACTOR = 0.015;
# of the data; each successively prior day's unavailability gets a # of the data; each successively prior day's unavailability gets a
# decreasing weight. Could be useful; easy to do. # decreasing weight. Could be useful; easy to do.
# #
sub rankNodesByUnavail(;$$$) { sub rankNodesByUnavail($;$$$) {
my $plcname = shift;
my ($sref,$dojitter,$doewma) = @_; my ($sref,$dojitter,$doewma) = @_;
if (!defined($plcname)) {
return undef;
}
if (!defined($sref)) { if (!defined($sref)) {
$sref = getNodeHistSequences(); $sref = getNodeHistSequences();
} }
......
...@@ -114,7 +114,7 @@ if (scalar(@ARGV) == 1) { ...@@ -114,7 +114,7 @@ if (scalar(@ARGV) == 1) {
($plcname,$plctype) = $qres->fetchrow_array(); ($plcname,$plctype) = $qres->fetchrow_array();
# tell other libplabmon users, sigh # tell other libplabmon users, sigh
setPLCName($plcname); libplabmon::setPLCName($plcname);
} }
else { else {
print STDERR "Must supply plcname argument!\n"; print STDERR "Must supply plcname argument!\n";
...@@ -218,7 +218,7 @@ $SIG{INT} = \&termsig; ...@@ -218,7 +218,7 @@ $SIG{INT} = \&termsig;
# #
my $seqref = {}; my $seqref = {};
if ($stateful) { if ($stateful) {
$seqref = getNodeHistSequences(); $seqref = getNodeHistSequences($plcname);
} }
# #
......
Supports Markdown
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