[Nut-upsuser] Premature end of script headers: upsimage.cgi

benjamin thielsen bthielsen at safarivideonetworks.com
Fri Jul 10 19:11:45 UTC 2009


On Jul 10, 2009, at 12.06, Arjen de Korte wrote:
>
>> battery.voltage: 55.00
>> battery.voltage.nominal: 0.00
>
> But here we have located the problem. A 'battery.voltage.nominal'  
> equal to zero will mean that the calculated  
> 'battery.voltage.minimum' and 'battery.voltage.maximum' will both be  
> zero. This results in a divide by zero error in the range  
> calculation. You can work around this by adding
>
>      override.battery.voltage.nominal = 48
>
> in 'ups.conf' for these drivers. This will make them ignore the  
> reported value from the UPS and use the correct nominal value. You  
> can also set
>
>      default.battery.voltage.minimum = 38.4
>      default.battery.voltage.maximum = 55.2
>
> to preset the minimum and maximum voltage range of the battery,  
> since neither are reported by the UPS.

aha - thank you, that seems to have done the trick.  i suppose that  
dividing by zero would also explain the floating point error.

regarding the values you've specified above for the override and  
defaults - how are those determined?

> What remains is the question if this is a problem in the snmp-ups  
> driver or the UPS. I honestly don't know.

well, if the output of snmpwalk is any indication, it appears that  
snmp-ups is accurately passing on values:

snmpwalk -v1 -c xxxxxxxxxx -m '/usr/share/snmp/mibs/powernet391.mib'  
ups4 .1.3.6.1.4.1 | grep -i nominal
PowerNet-MIB::upsAdvBatteryNominalVoltage.0 = INTEGER: 0

it seems this would indicate that the ups isn't interested in  
providing this value, right?  additionally, i don't see this  
information on the ups' own web interface either.

regards
-ben



More information about the Nut-upsuser mailing list