[Nut-upsdev] [Nut-upsuser] Powerware 9155 with SNMP card

Bernd Markgraf Bernd.Markgraf at med.ovgu.de
Wed Aug 15 11:30:43 UTC 2007


On Wed, 2007-08-15 at 13:17 +0200, Arjen de Korte wrote:
> > over the last few days I spent a little time on playing with pwmib.h and
> > surroundings. Here is how far I got up to now... maybe someone has a
> > similar setup and is willing to test things...
> 
> I don't, but I'm willing to take a look at the changes you made. :-)
cheers :-)

> > The first part now really add instant commands... The second part add
> > ASN_COUNTER as type for data we might get from the ups (needed for the
> > number of nie failures one can retrieve from the ups).
> 
> No problem here, looks fine to me.
let's wait for arnaud to double check and then think about commiting :-)

> > added a few OIDs for the battery test and report last test result. I'll
> > add the instant command to run a battery test soonish.
> 
> I assume you checked these with RFC 1628, which is good.
straigt from the ietf mib

> > pwmib.h got quite some work so it's attached rather than diff'ed. Lots
> > of added OIDs (now sorted for readability).
> > http://149.203.91.65/cgi-bin/nut/upsstats.cgi?host=ups2@149.203.91.145&treemode
> > gives the status page one of the upses with all added info. Also it's
> > now possible to run a battery test.
> 
> Looks good, although I doubt that the battery.runtime is correct. Please
> note that the NUT unit for this is seconds, not minutes (see
> docs/new-names.txt for a full listing). 
yeah, that was supposed to be seconds... I had that set to mins to
directly compare with powerware's software (without needing a calculator
8-))

> Also have a look at
> docs/new-drivers.txt for a look at the way how to list battery status.
I'll take look there. Thanks.

> You may wish to apply the following change to snmp-ups.c too:
> 
> void upsdrv_updateinfo(void)
> {
> 	upsdebugx(1,"SNMP UPS driver : entering upsdrv_updateinfo()");
> 
> 	/* only update every pollfreq */
> 	if (time(NULL) > (lastpoll + pollfreq)) {
> 
> +		status_init();
> 
> 		/* update all dynamic info fields */
> 		if (snmp_ups_walk(SU_WALKMODE_UPDATE))
> 			dstate_dataok();
> 		else
> 			dstate_datastale();
> 
> 		/* store timestamp */
> 		lastpoll = time(NULL);
> 
> +		status_commit();
> 	}
> }
> 
> And remove the calls to status_init() and status_commit() from the
> su_status_set() function. By doing so, the driver should be able to parse
> all "ups.status" OID's. Side effect will be that there may be some
> duplicate flags, but that should not pose a problem to clients, this is
> just cosmetic.
right, I'll test that.

> The above is a huge hack though, the real solution would be to integrate
> the SNMP, HID and SHUT drivers and the way how the latter two use the
> status flags (which is far more flexible than the above kludge).
Wasn't that on discussion before? 




More information about the Nut-upsdev mailing list