A little bug with kill-power on APC Smart-UPS

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

A little bug with kill-power on APC Smart-UPS

Chis-Serban Dinu-Razvan
Hello. I have find out that at least on my OS (Fedora x64) the kill-power for APC Smart-UPS (AP9631) over SNMP doesn't work so I have used tcpdump to seek the problem and I have discovered that the OID for that command is wrong.

--- apcupsd-3.14.14/src/drivers/snmplite/apc-oids.h.orig        2010-09-08 21:44:30.000000000 +0300
+++ apcupsd-3.14.14/src/drivers/snmplite/apc-oids.h     2016-07-08 11:01:29.000000000 +0300
@@ -120,7 +120,7 @@
 __UNUSED__ static int upsAdvConfigUpperBypassVoltTolerance[] = {1, 3, 6, 1, 4, 1, 318, 1, 1, 1, 5, 2, 39, -1};
 __UNUSED__ static int upsAdvConfigLowerBypassVoltTolerance[] = {1, 3, 6, 1, 4, 1, 318, 1, 1, 1, 5, 2, 40, -1};
 __UNUSED__ static int upsAdvConfigOutofSyncBypassTransferDelay[] = {1, 3, 6, 1, 4, 1, 318, 1, 1, 1, 5, 2, 41, -1};
-__UNUSED__ static int upsBasicControlConserveBattery[] = {1, 3, 6, 1, 4, 1, 318, 1, 1, 1, 6, 1, 1, -1};
+__UNUSED__ static int upsBasicControlConserveBattery[] = {1, 3, 6, 1, 4, 1, 318, 1, 1, 1, 6, 1, 1, 0, -1};
 __UNUSED__ static int upsAdvControlUpsOff[] = {1, 3, 6, 1, 4, 1, 318, 1, 1, 1, 6, 2, 1, -1};
 __UNUSED__ static int upsAdvControlRebootShutdownUps[] = {1, 3, 6, 1, 4, 1, 318, 1, 1, 1, 6, 2, 2, -1};
 __UNUSED__ static int upsAdvControlUpsSleep[] = {1, 3, 6, 1, 4, 1, 318, 1, 1, 1, 6, 2, 3, -1};

As you can see, it is missing a 0 at the end (http://www.mibdepot.com/cgi-bin/getmib3.cgi?win=mib_a&i=1&n=PowerNet-MIB&r=apc&f=powernet387.mib&v=v1&t=sca&o=upsBasicControlConserveBattery).

I don't know if is just on my configuration or it is a wider issue, but I thought to share my findings.

Also it would be nice if apcupsd could read the temperature/humidity from the sensor (http://www.mibdepot.com/cgi-bin/getmib3.cgi?win=mib_a&i=1&n=PowerNet-MIB&r=apc&f=powernet401.mib&v=v1&t=tree#uioSensorGroup). FTM I am using a perl wrapper to add the temperature to the output of the NIS server.

Best regards
Razvan Chis

------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
_______________________________________________
Apcupsd-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/apcupsd-users
Loading...