[Nut-upsuser] warnung: base variable (battery.runtime.low) is immutable

Kevin D kevind+nut at uni-bremen.de
Mon Sep 23 11:03:57 BST 2019


Hi,

I am using the NUT Software 2.7.4 (Ubuntu Repository) on Ubuntu 18.04.

Configuring a UPS with the snmp-ups driver and overriding the 
battery.runtime.low variable leads to following warnung/error:
Sep 23 11:10:08 hostname snmp-ups[27115]: dstate_setflags: base variable 
(battery.runtime.low) is immutable

Default for battery.runtime.low is 180 seconds. My idea is to increase 
the value to 420 seconds.

Although I get the warnung/error, in the output of upsc the variable is 
set to the desired value:
# upsc USV at hostname
battery.charge: 100.00
battery.current: 0.00
battery.runtime: 18120.00
battery.runtime.low: 420
[...]

My question is, which value is used now to determine the LB-State. The 
default value or the value in upsc?
Is it even possible to use the override.* value with the snmp-ups driver?

the ups.conf:
[UPS]
     driver = snmp-ups
     mibs = ietf
     port = x.x.x.x
     community = public
     snmp_version = v1
     pollfreq = 30
     desc = "USV"
     ignorelb
     override.battery.runtime.low = 420

The debug output of upsdrvctl:
# upsdrvctl -DDDD start USV
Network UPS Tools - UPS driver controller 2.7.4
    0.000000
If you're not a NUT core developer, chances are that you're told to 
enable debugging
to see why a driver isn't working for you. We're sorry for the 
confusion, but this is
the 'upsdrvctl' wrapper, not the driver you're interested in.

Below you'll find one or more lines starting with 'exec:' followed by an 
absolute
path to the driver binary and some command line option. This is what the 
driver
starts and you need to copy and paste that line and append the debug 
flags to that
line (less the 'exec:' prefix).

    0.000163    Starting UPS: USV
    0.000185    3 remaining attempts
    0.000191    exec:  /lib/nut/snmp-ups -a USV
Network UPS Tools - Generic SNMP UPS driver 0.97 (2.7.4)
Duplicate driver instance detected! Terminating other driver!
Detected                  on host x.x.x.x (mib: ietf 1.5)
dstate_setflags: base variable (battery.runtime.low) is immutable
dstate_setflags: base variable (battery.runtime.low) is immutable
using 'battery.runtime' to set battery low state

The debug output of snmp-ups
# /lib/nut/snmp-ups -D -a USV
Network UPS Tools - Generic SNMP UPS driver 0.97 (2.7.4)
    0.000000    debug level is '1'
    0.000802    SNMP UPS driver: entering upsdrv_initups()
    0.006699    load_mib2nut: trying classic method with 'ietf' mib
    0.068751    load_mib2nut: using ietf mib
    0.147381    Detected                  on host x.x.x.x (mib: ietf 1.5)
    0.147456    SNMP UPS driver: entering upsdrv_initinfo()
    [...]
    7.760191    entering su_setinfo(output.realpower.nominal)
    7.760200    getting data: battery.runtime.low (1.3.6.1.2.1.33.1.9.7.0)
    7.820735    su_find_infoval: no matching INFO_* value for this OID 
value (3)
    7.820778    entering su_setinfo(battery.runtime.low)
    7.820785    dstate_setflags: base variable (battery.runtime.low) is 
immutable
    7.820789    getting data: ups.beeper.status (1.3.6.1.2.1.33.1.9.8.0)
    7.856607    su_find_infoval: no matching INFO_* value for this OID 
value (0)
    7.856638    entering su_setinfo(ups.beeper.status)
    7.856647    SU_CMD_MASK => 1.3.6.1.2.1.33.1.9.8.0
    7.856650    SU_CMD_MASK => 1.3.6.1.2.1.33.1.9.8.0
    7.856653    SU_CMD_MASK => 1.3.6.1.2.1.33.1.9.8.0
    7.856659    getting data: input.transfer.low (1.3.6.1.2.1.33.1.9.9.0)
    7.892494    su_find_infoval: no matching INFO_* value for this OID 
value (0)
    7.892524    entering su_setinfo(input.transfer.low)
    7.892533    getting data: input.transfer.high (1.3.6.1.2.1.33.1.9.10.0)
    7.938250    su_find_infoval: no matching INFO_* value for this OID 
value (0)
    7.938282    entering su_setinfo(input.transfer.high)
    7.938297    using 'battery.runtime' to set battery low state
    7.938383    SNMP UPS driver: entering upsdrv_updateinfo()

Kind regards




More information about the Nut-upsuser mailing list