[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:

     .1.3.6.1.4.1.232.165.3.3.3.0 = 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"):

     .1.3.6.1.4.1.232.165.3.3.4.1.2
     .1.3.6.1.4.1.232.165.3.3.4.1.2.0

> Compare the following:
>
> hostadm:/etc/nut# snmpget -v 1 -c public \
> ups-pf34-2 .1.3.6.1.4.1.232.165.3.3.4.1.2.1
> 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 .1.3.6.1.4.1.232.165.3.3.4.1.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) .1.3.6.1.4.1.232.165.3.3.4.1.2, 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

     .1.3.6.1.4.1.232.165.3.3.4.1.2.(1|2|3)

to read the values. Adding something like

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

usually does the trick.

Best regards, Arjen
-- 
Please keep list traffic on the list




More information about the Nut-upsdev mailing list