[Nut-upsuser] ups.status don't switch to "OB LB"

Charles Lepple clepple at gmail.com
Tue May 24 12:41:24 UTC 2016


On May 20, 2016, at 11:02 AM, Cédric Lemarchand wrote:
> 
> I begin to suspect that the snmp driver or MIB didn’t get the change, is it possible ? or could it only be the UPS itself (snmp bug or configuration issue) ?

I am not as familiar with SNMP, so this might require some adjustment, but what happens if you run the following commands?

   snmpget -v2c -c public 192.168.99.60 1.3.6.1.2.1.33.1.2.1.0 1.3.6.1.2.1.33.1.4.1.0

The first value can be interpreted with the following table:

static info_lkp_t ietf_battery_info[] = {
        { 1, ""   /* unknown */ },
        { 2, ""   /* batteryNormal */},
        { 3, "LB" /* batteryLow */ },
        { 4, "LB" /* batteryDepleted */ },
        { 0, NULL }
};

Similarly for the second value:

static info_lkp_t ietf_power_source_info[] = {
        { 1, "" /* other */ },
        { 2, "OFF" /* none */ },
        { 3, "OL" /* normal */ },
        { 4, "OL BYPASS" /* bypass */ },
        { 5, "OB" /* battery */ },
        { 6, "OL BOOST" /* booster */ },
        { 7, "OL TRIM" /* reducer */ },
        { 0, NULL }
};

Reference: https://github.com/networkupstools/nut/blob/master/drivers/ietf-mib.c#L38

If these values don't change when the power state changes, then the problem is upstream of NUT.

-- 
Charles Lepple
clepple at gmail






More information about the Nut-upsuser mailing list