[Nut-upsuser] NUT Client shuts down when performing runtime calibration on APC UPS

Roger Price roger at rogerprice.org
Wed Jan 11 10:29:29 UTC 2017


On Wed, 11 Jan 2017, Merk - Oliver wrote:

> I've setup nas4free (latest version 11.0.0.4, which has NUT 2.7.4) in a 
> VM and configured it via webinterface to my APC UPS and set "shutdown 
> mode" to "UPS goes on battery" with a timer of 30s.
> -----------------------------------------------------------------------------------------------------------
> nas4free: etc# more upssched.conf
> CMDSCRIPT /usr/local/bin/upssched-cmd
> PIPEFN /var/run/upssched.pipe
> LOCKFN /var/run/upssched.lock
>
> AT COMMOK * EXECUTE notify
> AT COMMBAD * EXECUTE notify
> AT REPLBATT * EXECUTE notify
> AT NOCOMM * EXECUTE notify
> AT FSD * EXECUTE forced-shutdown
> AT NOPARENT * EXECUTE notify
> AT SHUTDOWN * EXECUTE notify
> AT ONLINE * CANCEL-TIMER shutdown
> AT ONLINE * EXECUTE resume
> AT ONBATT * START-TIMER shutdown 30
> AT ONBATT * EXECUTE shutdown-warning
> AT LOWBATT * START-TIMER shutdown
> AT LOWBATT * EXECUTE shutdown-warning

You have specified AT ONBATT * START-TIMER shutdown 30 which means that in 
30 seconds after an OB appearing, script "/usr/local/bin/upssched-cmd 
shutdown" will be called.  I'm guessing that this script has forgotten to 
test for "CAL" in ups.status.

You specify AT LOWBATT * START-TIMER shutdown without the timer value. 
To the best of my knowledge this is undefined in NUT.  Safer to specify 
the timer value.

Roger



More information about the Nut-upsuser mailing list