Hi, I would like to contribute code to make the SNMP driver compatible with HP's AF401A UPS module. It is also compatible with HP's older SNMP modules. It's just a new mib specification plus the necessary changes to snmp-ups.c Several sources have told me that these UPSs use the cpqpower.mib, but comparing that mib at http://www.snmplink.org/cgi-bin/nd/m/Ent/H/Hewlett %20Packard%20(HP)/%5BALL%5D%20-%20HP%20Insight% 20Management/Compaq/cpqpower.mib with the output of an snmpwalk shows this not to be the case. Therefore I have created af401amib.h which is just a modified copy of ietfmib.h. Here are the differences between ietfmib and af401amib ups.test.result ("1.3.6.1.2.1.33.1.7.4") not supported. battery.current ("1.3.6.1.2.1.33.1.2.6.0") not supported. battery.temperature ("1.3.6.1.2.1.33.1.2.7.0") not supported. output voltage is "1.3.6.1.2.1.33.1.4.4.1.2.1" output current is "1.3.6.1.2.1.33.1.4.4.1.3.1" The following output levels are not supported: output.realpower output.L1-N.voltage output.L2-N.voltage output.L3-N.voltage output.L1.current output.L2.current output.L3.current output.L1.realpower output.L2.realpower output.L3.realpower output.L1.power.percent output.L2.power.percent output.L3.power.percent input.frequency is "1.3.6.1.2.1.33.1.3.3.1.2.1" input.voltage is "1.3.6.1.2.1.33.1.3.3.1.3.1" input.current is "1.3.6.1.2.1.33.1.3.3.1.4.1" The following input levels are not supported: input.L1-N.voltage input.L2-N.voltage input.L3-N.voltage input.L1.current input.L2.current input.L3.current input.L1.realpower input.L2.realpower input.L3.realpower Since the SNMP driver complains and exits if it tries to access a value that is not supported it was necessary to completely remove upsupported items from the specification. I hope this code is accepted as it would mean I no longer have to build my own nut package when a new debian version comes out. Thanks, - Philip Ward Unix Systems Administrator Ext 7274 -- Academic Excellence at the Heart of Scotland. The University of Stirling is a charity registered in Scotland, number SC 011159. -------------- next part -------------- A non-text attachment was scrubbed... Name: af401amib.h Type: text/x-chdr Size: 8518 bytes Desc: not available URL: <http://lists.alioth.debian.org/pipermail/nut-upsdev/attachments/20090831/dfe1f6d8/attachment.h> -------------- next part -------------- A non-text attachment was scrubbed... Name: snmp-ups.c.patch Type: text/x-patch Size: 513 bytes Desc: not available URL: <http://lists.alioth.debian.org/pipermail/nut-upsdev/attachments/20090831/dfe1f6d8/attachment.bin>
On Aug 31, 2009, at 7:50 AM, Philip Ward wrote:> Hi, > > I would like to contribute code to make the SNMP driver compatible > with > HP's AF401A UPS module. It is also compatible with HP's older SNMP > modules. > It's just a new mib specification plus the necessary changes to > snmp-ups.cPhilip, thanks for the patch. Which version is the patch against? The maintainer of snmp-ups (Arnaud) is on vacation at the moment, but if you have an account on Alioth, you can create a patch tracker item and get notified automatically when things get merged. If you don't want to bother with setting up an account, you can still keep tabs on it via this email list. https://alioth.debian.org/tracker/?atid=411544&group_id=30602&func=browse - Charles
Citeren Philip Ward <p.g.ward op stir.ac.uk>: [...]> Therefore I have created af401amib.h which is just a modified copy of > ietfmib.h.In that case, I very much doubt that it is needed to add another MIB to snmp-ups. Unsupported OIDs are meant to be ignored. Unless they happen to be the one that is used to check if the MIB is supported of course, this shouldn't cause the driver to exit at any time.> Here are the differences between ietfmib and af401amib[...]> Since the SNMP driver complains and exits if it tries to access a value > that is not supported it was necessary to completely remove upsupported > items from the specification.The SNMP driver *will* complain about unsupported OIDs (unfortunately, telling you that it is an error), but should proceed anyhow. Could you post the output of /path/to/snmp-ups -DDD -a upsname for the original (unmodified) snmp-ups driver? Best regards, Arjen -- Please keep list traffic on the list
Please keep list traffic on the list. ----- Doorgestuurd bericht van p.g.ward op stir.ac.uk ----- Datum: Mon, 31 Aug 2009 14:59:37 +0100 Van: Philip Ward <p.g.ward op stir.ac.uk> Onderwerp: Re: [Nut-upsdev] SNMP on HP UPS Aan: Arjen de Korte <nut+devel op de-korte.org> Sure, The output is attached. However, it is not just unsupported OIDs that are a problem, but also different OIDs. output voltage is "1.3.6.1.2.1.33.1.4.4.1.2.1" on the af401a but ietf has it at "1.3.6.1.2.1.33.1.4.4.1.2.0" output current is "1.3.6.1.2.1.33.1.4.4.1.3.1" on the af401a but ietf has it at "1.3.6.1.2.1.33.1.4.4.1.3.0" Similarly for input.frequency, input.voltage and input.current. I'm not sure that there is a way around these differences without either a new mib, or changing the way that the driver scans the OID tree to try and resolve them. Thanks for taking the time to consider this. - Philip Ward Unix Systems Administrator Ext 7274 On Mon, 2009-08-31 at 14:30 +0100, Arjen de Korte wrote:> Citeren Philip Ward <p.g.ward op stir.ac.uk>: > > [...] > > > Therefore I have created af401amib.h which is just a modified copy of > > ietfmib.h. > > In that case, I very much doubt that it is needed to add another MIB > to snmp-ups. Unsupported OIDs are meant to be ignored. Unless they > happen to be the one that is used to check if the MIB is supported of > course, this shouldn't cause the driver to exit at any time. > > > Here are the differences between ietfmib and af401amib > > [...] > > > Since the SNMP driver complains and exits if it tries to access a value > > that is not supported it was necessary to completely remove upsupported > > items from the specification. > > The SNMP driver *will* complain about unsupported OIDs (unfortunately, > telling you that it is an error), but should proceed anyhow. > > Could you post the output of > > /path/to/snmp-ups -DDD -a upsname > > for the original (unmodified) snmp-ups driver? > > Best regards, Arjen > -- > Please keep list traffic on the list > > > _______________________________________________ > Nut-upsdev mailing list > Nut-upsdev op lists.alioth.debian.org > http://lists.alioth.debian.org/mailman/listinfo/nut-upsdev-- Academic Excellence at the Heart of Scotland. The University of Stirling is a charity registered in Scotland, number SC 011159. ----- Einde doorgestuurd bericht ----- -------------- next part -------------- A non-text attachment was scrubbed... Name: snmp-ups.log Type: text/x-log Size: 11444 bytes Desc: niet beschikbaar URL: <http://lists.alioth.debian.org/pipermail/nut-upsdev/attachments/20090831/e1a914ba/attachment-0001.bin>