<div dir="ltr">P.S.2<br><br>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!<div><br></div><div>I ran nut-journal to check what happened:</div><div><br></div><div><div>        Previous complete boot through shutdown</div><div>Oct 29 10:09:33 i7 upsdrvctl[1966]: Using subdriver: MGE HID 1.32</div><div>Oct 29 10:09:34 i7 upsdrvctl[1966]: Network UPS Tools - Generic HID driver 0.38 (2.7.1)</div><div>Oct 29 10:09:34 i7 upsdrvctl[1966]: USB communication driver 0.32</div><div>Oct 29 10:09:35 i7 upsdrvctl[1966]: Network UPS Tools - UPS driver controller 2.7.1</div><div>Oct 29 10:09:35 i7 upsd[2235]: fopen /var/lib/ups/upsd.pid: No such file or directory</div><div>Oct 29 10:09:35 i7 upsd[2235]: listening on ::1 port 3493</div><div>Oct 29 10:09:35 i7 upsd[2235]: listening on ::1 port 3493</div><div>Oct 29 10:09:35 i7 upsd[2235]: listening on 127.0.0.1 port 3493</div><div>Oct 29 10:09:35 i7 upsd[2235]: Connected to UPS [myups]: usbhid-ups-myups</div><div>Oct 29 10:09:35 i7 upsd[2235]: listening on 127.0.0.1 port 3493</div><div>Oct 29 10:09:35 i7 upsd[2235]: Connected to UPS [myups]: usbhid-ups-myups</div><div>Oct 29 10:09:35 i7 upsd[2236]: Startup successful</div><div>Oct 29 10:09:35 i7 upsmon[2237]: fopen /var/run/upsmon.pid: No such file or directory</div><div>Oct 29 10:09:35 i7 upsmon[2237]: UPS: myups@localhost (master) (power value 1)</div><div>Oct 29 10:09:35 i7 upsmon[2237]: Using power down flag file /etc/ups/killpower</div><div>Oct 29 10:09:35 i7 upsmon[2238]: Startup successful</div><div>Oct 29 10:09:35 i7 upsd[2236]: User upsmaster@::1 logged into UPS [myups]</div><div>Oct 29 10:46:46 i7 upsmon[2239]: UPS myups@localhost battery is low</div><div>Oct 29 10:46:46 i7 upssched[3581]: Executing command: ups-low-battery</div><div>Oct 29 10:46:46 i7 upssched-cmd[3583]: Calling upssched-cmd ups-low-battery</div><div>Oct 29 10:46:46 i7 upssched-cmd[3584]: Unrecognized command: ups-low-battery</div><div>Oct 29 10:46:46 i7 upssched[3585]: Timer daemon started</div><div>Oct 29 10:46:46 i7 upssched[3585]: New timer: shutdown-timer (35 seconds)</div><div>Oct 29 10:47:21 i7 upssched[3585]: Event: shutdown-timer</div><div>Oct 29 10:47:21 i7 upssched-cmd[3593]: Calling upssched-cmd shutdown-timer</div><div>Oct 29 10:47:21 i7 upssched-cmd[3594]: Shutdown timer reached: Calling upsmon -c fsd</div><div>Oct 29 10:47:21 i7 upsmon[2239]: Signal 10: User requested FSD</div><div>Oct 29 10:47:21 i7 upsd[2236]: Client upsmaster@::1 set FSD on UPS [myups]</div><div>Oct 29 10:47:21 i7 upsmon[2239]: Executing automatic power-fail shutdown</div><div>Oct 29 10:47:21 i7 upsmon[2239]: Auto logout and shutdown proceeding</div><div>Oct 29 10:47:26 i7 upsmon.conf[3602]: SHUTDOWNCMD calling /sbin/shutdown to shut down system</div><div>Oct 29 10:47:26 i7 upsd[2236]: mainloop: Interrupted system call</div><div>Oct 29 10:47:26 i7 upsd[2236]: Signal 15: exiting</div><div>Oct 29 10:47:26 i7 upsdrvctl[3651]: Network UPS Tools - UPS driver controller 2.7.1</div><div>Oct 29 10:47:32 i7 systemd-journal[523]: Journal stopped</div></div><div><br></div><div>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:</div><div><br></div><div><div>NOTIFYFLAG ONLINE       SYSLOG+WALL+EXEC</div><div>NOTIFYFLAG ONBATT       SYSLOG+WALL+EXEC</div><div>NOTIFYFLAG LOWBATT      SYSLOG+WALL</div><div>NOTIFYFLAG FSD  SYSLOG+WALL+EXEC</div><div>NOTIFYFLAG COMMOK       SYSLOG+WALL</div><div>NOTIFYFLAG COMMBAD      SYSLOG+WALL</div><div>NOTIFYFLAG SHUTDOWN     SYSLOG+WALL+EXEC</div><div>NOTIFYFLAG REPLBATT     SYSLOG+WALL</div><div>NOTIFYFLAG NOCOMM       SYSLOG+WALL</div><div>NOTIFYFLAG NOPARENT     SYSLOG+WALL+EXEC</div></div><div><br></div><div>Can you confirm if that is enough as a measure not to initiate shutdown on low battery without actual power failure?</div><div><br></div><div>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]</div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div dir="ltr">---<br><div><div>George</div></div></div></div></div></div></div>