[Nut-upsuser] The system doesn't shutdown

Roger Price roger at rogerprice.org
Thu Oct 29 13:22:04 UTC 2015


On Thu, 29 Oct 2015, George Anchev wrote:

> Today I experienced something weird. As I was working, the system 
> started a shutdown and did shut down, then the UPS got powered off and 
> then back on - an expected behavior for a power fail situation. However 
> there was no power failure!

...
> Oct 29 10:46:46 i7 upsmon[2239]: UPS myups at localhost battery is low
> Oct 29 10:46:46 i7 upssched[3581]: Executing command: ups-low-battery
> Oct 29 10:46:46 i7 upssched-cmd[3583]: Calling upssched-cmd ups-low-battery
> Oct 29 10:46:46 i7 upssched-cmd[3584]: Unrecognized command: ups-low-battery
> Oct 29 10:46:46 i7 upssched[3585]: Timer daemon started
> Oct 29 10:46:46 i7 upssched[3585]: New timer: shutdown-timer (35 seconds)
> Oct 29 10:47:21 i7 upssched[3585]: Event: shutdown-timer
> Oct 29 10:47:21 i7 upssched-cmd[3593]: Calling upssched-cmd shutdown-timer
> Oct 29 10:47:21 i7 upssched-cmd[3594]: Shutdown timer reached: Calling upsmon -c fsd
...

> It seems NUT has executed a shutdown because of low battery. However the 
> battery was at 100% before shutdown and right after boot. I suspect this 
> is just another case of those false positive alarms 
> (disconnects/reconnects) which happen randomly and are also sometimes 
> accompanied by messages for low battery (instantly followed by a message 
> of battery ok). So I removed the +EXEC on certain lines in upsmon.conf:
> 
> NOTIFYFLAG ONLINE       SYSLOG+WALL+EXEC
> NOTIFYFLAG ONBATT       SYSLOG+WALL+EXEC
> NOTIFYFLAG LOWBATT      SYSLOG+WALL
> NOTIFYFLAG FSD  SYSLOG+WALL+EXEC
> NOTIFYFLAG COMMOK       SYSLOG+WALL
> NOTIFYFLAG COMMBAD      SYSLOG+WALL
> NOTIFYFLAG SHUTDOWN     SYSLOG+WALL+EXEC
> NOTIFYFLAG REPLBATT     SYSLOG+WALL
> NOTIFYFLAG NOCOMM       SYSLOG+WALL
> NOTIFYFLAG NOPARENT     SYSLOG+WALL+EXEC
> 
> Can you confirm if that is enough as a measure not to initiate shutdown 
> on low battery without actual power failure?

I had exactly the same thing two days ago with an MGE Ellipse 1500 in 
which I had changed the batteries.  Its clear that the script upssched-cmd 
should check the real battery charge before shutting anything down.  I'll 
look at this, but it will be next week at the earliest.

Meantime your change to the NOTIFYFLAGs is a good fix.

> Also - what would be the proper config to *execute* a shutdown if there 
> is a low battery but *only* when there is an actual power failure 
> situation (i.e. the UPS is running on battery power)? [I suppose that 
> might work for the "optimistic" setup]

At present I don't have an example, perhaps others could advise you.

Roger


More information about the Nut-upsuser mailing list