[Nut-upsdev] CPQPOWER-MIB contribution

Arjen de Korte nut+devel at de-korte.org
Mon Feb 1 13:18:19 UTC 2010

Citeren Philip Ward <p.g.ward op stir.ac.uk>:

>> Why did you remove the three phase support? The unit seems to
>> correctly report the number of input- and output phases, so leaving
>> that in wouldn't hurt. Even though it's not tested, you already know
>> it works for single phase units.
> I removed it because requesting a specific 3-phase variable does not
> work (at least on the units I have to hand).

Most likely, because they are apparently wired for single phase operation:

     . = INTEGER: 1
     (upsInputNumPhases.0 = INTEGER: 1)

In most cases the above means that if you want to read the input  
voltage, you don't mention the phase (or use the extension ".0"):


> Compare the following:
> hostadm:/etc/nut# snmpget -v 1 -c public \
> ups-pf34-2 .
> Error in packet
> Reason: (noSuchName) There is no such variable name in this MIB.
> Failed object: CPQPOWER-MIB::upsInputVoltage.1

Yes. When a unit is wired for single phase operation, you usually  
don't need (sometimes even, must not) add a phase.

> hostadm:/etc/nut# snmpget -v 1 -c public \
> ups-pf34-2 .
> CPQPOWER-MIB::upsInputVoltage.1 = INTEGER: 245

This is indeed what we expect.

> This suggests to me that requesting the 3-phase values will cause an
> error. Unless I have misunderstood how the driver grabs the values. Does
> the SU_INPUT_3 flag tell the driver to ask for (for
> example) ., and then only grab the one that
> it asked for?

No, this flag will tell it to only query for this variable if the  
input_phases value is 3. So you'd still need to query for


to read the values. Adding something like

	{ "input.voltage", 0, 1.0, CPQPOWER_OID_IN_VOLTAGE ".0", "",  
	{ "input.L1-N.voltage", 0, 1.0, CPQPOWER_OID_IN_VOLTAGE ".1", "",  
	{ "input.L2.N.voltage", 0, 1.0, CPQPOWER_OID_IN_VOLTAGE ".2", "",  
	{ "input.L3-N.voltage", 0, 1.0, CPQPOWER_OID_IN_VOLTAGE ".3", "",  

usually does the trick.

Best regards, Arjen
Please keep list traffic on the list

More information about the Nut-upsdev mailing list