[Nut-upsuser] Powerware 9155 with SNMP card

Arjen de Korte nut+devel at de-korte.org
Fri Aug 10 09:28:43 UTC 2007


> after my questions yesterday I did a little detective work... First of
> all it's thanks to the nice and clean style of NUT that i found what
> I've been looking for!

Excellent! I'm cross posting this to the development mailinglist, since
this is going beyond the scope of the user mailinglist.

> So here's what's going wrong:
>
> snmp-ups -DDDDDDDDD -a ups2 gives me this:
>
> Network UPS Tools - Multi-MIBS SNMP UPS driver 0.42 ()
> debug level is '9'

[...]

> su_ups_get: ups.status 1.3.6.1.4.1.534.1.4.5.0
> SNMP UPS driver : entering su_status_set()
> su_find_infoval: no matching INFO_* value for this OID value (9)
> => value: 9

[...]

> So NUT doesn't know what '9' is supposed to be of a status.
> Looking into ietfmib.h ietf_pwr_info[] indeed stops at 7.
> The missing values from XUPS.mib (provided on the cds that came with the
> ups) are:
>
> parallelCapacity(8),    -- normal enhanced by Parallel for Capacity
> 			   operation
> parallelRedundant(9),   -- normal enhanced by Redundant Parallel
> 			   operation
> highEfficiencyMode(10)  -- normal enhanced by High Efficiency mode
>
> So would one go ahead and add these values to ietf_pwr_info[] ?
> Or would one rather extend that inside pwmib.h? The latter seems more
> obvious to me, since XUPS.mib states that it extends upsOutputSource
> from the rfc1628 MIB.

That would be the best way to deal with this, since other vendors may
extend this too, which may lead to incompatibilities. That's why we
support different ones.

> For being the easier way to check for me right now I extend
> ietf_pwr_info like this:
>         { 8, "PCAP"   /* parallel capacity */ },
>         { 9, "PRED"   /* parallel redundancy */ },
>         {10, "HEFF"   /* high efficiancy */ },
>
> So I get a status of "PRED" right now, which is indeed what I'm running.
> Though I cannot answer the question who NUT behaves with it being not
> OL. Some hints here would be appreciated.

Clients expect the system to be either OL or OB (actually, this is an
indication of the linestatus). So we may need to add OL to other power
states as well, to make sure the notifications work as expected. For the
moment you'll be fine (as long as OB and OB LB can be detected, the
clients will know when to shutdown).

> As for the missing variables in the MIB these are
>
> su_ups_get: output.current 1.3.6.1.4.1.534.1.4.4.1.3
> [ups2] nut_snmp_get: 1.3.6.1.4.1.534.1.4.4.1.3: Error in packet:
> (noSuchName) There is no such variable name in this MIB.
> => Failed
>
> Check inphases
> inphases is set
> su_ups_get: input.L1.realpower 1.3.6.1.4.1.534.1.3.4.1.4.1
> [ups2] nut_snmp_get: 1.3.6.1.4.1.534.1.3.4.1.4.1: Error in packet:
> (noSuchName)
> There is no such variable name in this MIB.
> => Failed
> Check inphases
> inphases is set
> su_ups_get: input.L2.realpower 1.3.6.1.4.1.534.1.3.4.1.4.2
> [ups2] nut_snmp_get: 1.3.6.1.4.1.534.1.3.4.1.4.2: Error in packet:
> (noSuchName)
> There is no such variable name in this MIB.
> => Failed
> Check inphases
> inphases is set
> su_ups_get: input.L3.realpower 1.3.6.1.4.1.534.1.3.4.1.4.3
> [ups2] nut_snmp_get: 1.3.6.1.4.1.534.1.3.4.1.4.3: Error in packet:
> (noSuchName)
> There is no such variable name in this MIB.
> => Failed
>
>
> I haven't figured them out yet...

Apparently, the autodetection failed here and it selects the default ietf
MIB, where these are not set. This will probably be fixed by adding

	mibs = pw

to the ups.conf entry for these devices (to select the data from pwmib.h
file). See also 'man snmp-ups' for an example.

You'll probably want to add the folliwing to "pwmib.h" (I'm not in favor
of adding ups.status words):

info_lkp_t pw_pwr_info[] = {
	{ 1, ""       /* other */ },
	{ 2, "OFF"    /* none */ },
	{ 3, "OL"     /* normal */ },
	{ 4, "BYPASS" /* bypass */ },
	{ 5, "OB"     /* battery */ },
	{ 6, "OL BOOST"  /* booster */ },
	{ 7, "OL TRIM"   /* reducer */ },
	{ 8, "OL"   /* parallel capacity */ },
	{ 9, "OL"   /* parallel redundancy */ },
	{10, "OL"   /* high efficiancy */ },
	{ 0, "NULL" }
};

and change

{ "ups.status", ST_FLAG_STRING, SU_INFOSIZE, PW_OID_POWER_STATUS, "OFF",
SU_STATUS_PWR, &ietf_pwr_info[0] },

to

{ "ups.status", ST_FLAG_STRING, SU_INFOSIZE, PW_OID_POWER_STATUS, "OFF",
SU_STATUS_PWR, &pw_pwr_info[0] },

Best regards,
Arjen
-- 
Eindhoven - The Netherlands
Key fingerprint - 66 4E 03 2C 9D B5 CB 9B  7A FE 7E C1 EE 88 BC 57




More information about the Nut-upsuser mailing list