[Nut-upsuser] The system doesn't shutdown
George Anchev
studio at anchev.net
Thu Oct 29 09:04:39 UTC 2015
P.S.2
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!
I ran nut-journal to check what happened:
Previous complete boot through shutdown
Oct 29 10:09:33 i7 upsdrvctl[1966]: Using subdriver: MGE HID 1.32
Oct 29 10:09:34 i7 upsdrvctl[1966]: Network UPS Tools - Generic HID driver
0.38 (2.7.1)
Oct 29 10:09:34 i7 upsdrvctl[1966]: USB communication driver 0.32
Oct 29 10:09:35 i7 upsdrvctl[1966]: Network UPS Tools - UPS driver
controller 2.7.1
Oct 29 10:09:35 i7 upsd[2235]: fopen /var/lib/ups/upsd.pid: No such file or
directory
Oct 29 10:09:35 i7 upsd[2235]: listening on ::1 port 3493
Oct 29 10:09:35 i7 upsd[2235]: listening on ::1 port 3493
Oct 29 10:09:35 i7 upsd[2235]: listening on 127.0.0.1 port 3493
Oct 29 10:09:35 i7 upsd[2235]: Connected to UPS [myups]: usbhid-ups-myups
Oct 29 10:09:35 i7 upsd[2235]: listening on 127.0.0.1 port 3493
Oct 29 10:09:35 i7 upsd[2235]: Connected to UPS [myups]: usbhid-ups-myups
Oct 29 10:09:35 i7 upsd[2236]: Startup successful
Oct 29 10:09:35 i7 upsmon[2237]: fopen /var/run/upsmon.pid: No such file or
directory
Oct 29 10:09:35 i7 upsmon[2237]: UPS: myups at localhost (master) (power value
1)
Oct 29 10:09:35 i7 upsmon[2237]: Using power down flag file
/etc/ups/killpower
Oct 29 10:09:35 i7 upsmon[2238]: Startup successful
Oct 29 10:09:35 i7 upsd[2236]: User upsmaster@::1 logged into UPS [myups]
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
Oct 29 10:47:21 i7 upsmon[2239]: Signal 10: User requested FSD
Oct 29 10:47:21 i7 upsd[2236]: Client upsmaster@::1 set FSD on UPS [myups]
Oct 29 10:47:21 i7 upsmon[2239]: Executing automatic power-fail shutdown
Oct 29 10:47:21 i7 upsmon[2239]: Auto logout and shutdown proceeding
Oct 29 10:47:26 i7 upsmon.conf[3602]: SHUTDOWNCMD calling /sbin/shutdown to
shut down system
Oct 29 10:47:26 i7 upsd[2236]: mainloop: Interrupted system call
Oct 29 10:47:26 i7 upsd[2236]: Signal 15: exiting
Oct 29 10:47:26 i7 upsdrvctl[3651]: Network UPS Tools - UPS driver
controller 2.7.1
Oct 29 10:47:32 i7 systemd-journal[523]: Journal stopped
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?
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]
---
George
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20151029/ca14a48b/attachment.html>
More information about the Nut-upsuser
mailing list