I was attempting to configure a new installation of lpar2rrd (version 2.65) for a customer today when I encountered the following error during the initial load of data from the HMC:
lpar2rrd@nim [/home/lpar2rrd/lpar2rrd]$ ./load.sh
LPAR2RRD version 2.65
HMC : hmc01
managed system : 750-1 (type_model*serial : 8233-E8B*0646D0P)
HMC version : 77301
There is no RRD: attempting to do initial load, be patient, it might take some time
sample rate : 60 seconds
fetching HMC : hmc01:750-DR CPU lpar config
fetching HMC : hmc01:750-DR CPU/MEM global config
sys change : hmc01:750-DR:100
installing WWW : install-html.sh 2.59
An error occured in lpar2rrd, check ./error.log and output of load.sh
$ tail -3 ./error.log
Argument "" isn't numeric in numeric le (<=) at /home/lpar2rrd/lpar2rrd/lpar2rrd.pl line 532.
Can't use string ("") as a SCALAR ref while "strict refs" in use at /home/lpar2rrd/lpar2rrd/lpar2rrd.pl line 533.
Wed 23 Nov 12:04:09 2011 : hmc01 : An error occured in lpar2rrd.pl, check ./error.log and output of load.sh
We were able to get this working by hacking the lpar2rrd.pl script.
The following code:
if ( $loadhours <= 0 || $loadmins <= 0) { # workaround as this sometimes is negative , need to check it out ...
my $t1 = localtime($$last_rec);
my $t2 = localtime($t);
print STDERR "$act_time: time issue 1 : $host:$managedname $loadhours $loadmins \n";
print STDERR " Last saved record (HMC lslparutil time) : $$last_rec ; HMC time : $t \n";
print "$act_time: time issue 1 : $host:$managedname $loadhours $loadmins \n" if $DEBUG ;
print " Last saved record (HMC lslparutil time) : $$last_rec ; HMC time : $t \n" if $DEBUG ;
$loadhours = 3;
$loadmins = 140;
}
Was changed to:
$loadmins = 140;
if ( $loadhours <= 0 || $loadmins <= 0) { # workaround as this sometimes is negative , need to check it out ...
my $t1 = localtime($$last_rec);
my $t2 = localtime($t);
print STDERR "$act_time: time issue 1 : $host:$managedname $loadhours $loadmins \n";
print STDERR " Last saved record (HMC lslparutil time) : $$last_rec ; HMC time : $t \n";
print "$act_time: time issue 1 : $host:$managedname $loadhours $loadmins \n" if $DEBUG ;
print " Last saved record (HMC lslparutil time) : $$last_rec ; HMC time : $t \n" if $DEBUG ;
$loadhours = 3;
}
The initial load then ran successfully.
Then we changed the code back to its previous configuration:
if ( $loadhours <= 0 || $loadmins <= 0) { # workaround as this sometimes is negative , need to check it out ...
my $t1 = localtime($$last_rec);
my $t2 = localtime($t);
print STDERR "$act_time: time issue 1 : $host:$managedname $loadhours $loadmins \n";
print STDERR " Last saved record (HMC lslparutil time) : $$last_rec ; HMC time : $t \n";
print "$act_time: time issue 1 : $host:$managedname $loadhours $loadmins \n" if $DEBUG ;
print " Last saved record (HMC lslparutil time) : $$last_rec ; HMC time : $t \n" if $DEBUG ;
$loadhours = 3;
$loadmins = 140;
}
After which, all subsequent loads worked as expected! Fortunately my colleague, Nathan Edwards, had already hit this bug a while ago and was able to help me. Thanks again Nathan!
According to Pavel Hampel (lpar2rrd developer), the next version of lpar2rrd (2.66) will fix this issue.