[Nut-upsuser] Are UPS shutdown commands automatically sent?
Rob Groner
rgroner at RTD.com
Fri May 22 21:25:57 UTC 2015
Roger,
So I'm pursuing the strategy of issuing the "upsdrvctl shutdown" command script when the OS (Porteus, in this case) is shutting down. I so far can't get it to do it, but I'm sure I'll overcome it, but I realized something else might be a problem.
Won't that script execute every time Linux is shutting down, including rebooting? So, if I choose to reboot my system, I would most likely see the UPS shutoff and then turn back on, somewhere in the middle of my system booting back up.
I can think of a couple solutions:
1) Have the script verify that the UPS is actually in a OB state before giving the shutdown command. That should prevent unintended UPS power cycles when simply rebooting the system.
2) Have the UPS itself not respect any "load.off.delay" or similar commands when it is online.
Looking over UPS documentation and various helps, it seems most people would expect their UPS to turn the load off and then back on, even if it has wall power the entire time. That would facilitate testing at a minimum. So I'm guessing option #2 isn't a good one.
Is #1 the correct way to deal with this? Or am I misunderstanding the problem (as in, there IS no problem)? It seems like this would have been dealt with before by people who interact with UPS and NUT more often than I.
Sincerely,
Robert G. Groner
Software Engineer
RTD Embedded Technologies, Inc.
ISO 9001 and AS9100 Certified
Ph: 814-234-8087
www.rtd.com
-----Original Message-----
From: Roger Price [mailto:roger at rogerprice.org]
Sent: Thursday, May 21, 2015 3:59 PM
To: Rob Groner
Subject: Re: [Nut-upsuser] Are UPS shutdown commands automatically sent?
On Thu, 21 May 2015, Rob Groner wrote:
> I’m testing that my system will shutdown when the UPS has been on
> battery for 10 seconds. That all works fine….10 seconds after pulling
> the plug, my system does shut down. However, I am not getting the
> commands into the UPS telling it to power off and then power on. I had thought I read somewhere that these commands are sent automatically when “upsmon –c fsd” happens…but I can’t find that, nor can I find any clear instructions on where I would put the commands to tell the UPS to start its shutdown and restart timers.
Hi, I went through the same learning curve. I wrote up my notes at http://rogerprice.org/NUT.html Perhaps there is something there that could help you. Best Regards, Roger
More information about the Nut-upsuser
mailing list