Replies: 2 comments
-
BTW, this was the output from my Ubuntu 19 /var/log/syslog that put me onto this: Sep 26 09:52:42 MSIC2022 upsmon[2878]: UPS apcsmartups1500@localhost on battery |
Beta Was this translation helpful? Give feedback.
-
Thank you! We'll probably want to update the docs at some point! |
Beta Was this translation helpful? Give feedback.
-
Hi Tim,
I used the upssched.conf from your video and my machine done shut itself down on me! :) The UPS went on battery briefly (1 second), which started two timers: onbatt and earlyshutdown. When the UPS came back on line ONLINE event canceled the onbatt timer, but the earlyshutdown timer continued until it timed out and shut my system down. :(
Anyway, I have added another event:
AT ONLINE * CANCEL-TIMER earlyshutdown online
So that my entire file now looks like:
CMDSCRIPT /etc/nut/upssched-cmd
PIPEFN /etc/nut/upssched.pipe
LOCKFN /etc/nut/upssched.lock
AT ONBATT * START-TIMER onbatt 120
AT ONLINE * CANCEL-TIMER onbatt online
AT ONBATT * START-TIMER earlyshutdown 120
AT ONLINE * CANCEL-TIMER earlyshutdown online
AT LOWBATT * EXECUTE onbatt
AT COMMBAD * START-TIMER commbad 120
AT COMMOK * CANCEL-TIMER commbad commok
AT NOCOMM * EXECUTE commbad
AT SHUTDOWN * EXECUTE powerdown
AT SHUTDOWN * EXECUTE powerdown
p.s., I am really running standalone but set it up as client/server because I was going to have my VMs shut themselves down, but ended up just letting the host suspend them as part of the shutdown process -- hence the relatively short timer.
Beta Was this translation helpful? Give feedback.
All reactions