This is the shutdown command I am using in /etc/nut/upsmon.conf:
Code: Select all
SHUTDOWNCMD "/usr/sbin/upsdrvctl shutdown Eaton5SC1500 ; /sbin/shutdown -h +0"Here is part of /var/log/messages during my last test "power outage":
Code: Select all
Jul 26 19:08:57 run-public upssched[4923]: Event: timeshutdown
Jul 26 19:08:57 run-public upssched-cmd[4940]: The UPS has been on battery for 100 seconds -- shutting down
Jul 26 19:08:57 run-public upsmon[4897]: Signal 10: User requested FSD
Jul 26 19:08:57 run-public upsmon[4897]: FSD set on UPS Eaton5SC1500@127.0.0.1 failed: ERR ACCESS-DENIED
Jul 26 19:08:57 rur-public upsmon[4897]: Executing automatic power-fail shutdown
Jul 26 19:08:57 run-public upsmon[4897]: Auto logout and shutdown proceedingRunning upsdrvctl in test mode doesn't tell me much:
Code: Select all
# /usr/sbin/upsdrvctl -t shutdown Eaton5SC1500
Network UPS Tools - UPS driver controller 2.7.4
*** Testing mode: not calling exec/kill
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.000137 Shutdown UPS: Eaton5SC1500
0.000151 exec: /lib64/nut/usbhid-ups -a Eaton5SC1500 -k