[Nut-upsuser] Problems with NUT 2.7.2 on CentOS 7 and using the Mini-Box OpenUPS
clepple at gmail.com
Fri Mar 13 23:17:50 UTC 2015
On Mar 13, 2015, at 10:14 AM, Rob Groner <rgroner at RTD.com> wrote:
>> The documentation isn't explicit about this, but 'upsdrvctl shutdown' is
>> meant to be run after all of the other processes on the system have been
>> killed, real filesystems have been unmounted, and the kernel shutdown
>> syscall is about to be called. Usually the init scripts will take care of this,
>> although I don't know how CentOS handles that specifically.
>> If you want to test the low-battery shutdown procedure (where upsmon
>> tells the rest of the system to shut down, then tells the UPS to power off),
>> you can run 'upsmon -c fsd' (Forced ShutDown). The init scripts should call
>> 'upsdrvctl shutdown' implicitly when everything else has stopped.
> I wish it were explicit. :)
Since that comment didn't come with any documentation patches attached, I'm going to act like it never happened :)
> You say to use FSD for testing the system...what do I use for real?
Let's back up. I was recommending the use of 'upsmon -c fsd' for simulating the low battery condition that upsmon reacts to. That allows testing of the low battery shutdown process without actually draining the battery. It sounds like you are describing a shutdown triggered by a sysadmin, rather than upsmon.
> I thought I was supposed to call upsdrvctl shutdown with some delay, and THEN begin shutting down my PC, in the hopes I finish before the delay expires and the UPS shuts off of the power supply.
You could, although there is no delay parameter to 'upsdrvctl shutdown' So you are at the mercy of whether the shutdown process finishes in time.
> When you say "the init scripts will take care of this", do you mean that if I execute a system shutdown, it will automatically send the "upsdrvctl shutdown" command at the end?
IMHO, yes, this is the job of the distribution's packager: lining up the scripts such that typing 'poweroff' will both shut down the UPS after a delay, and shut down the computer (or halt it and wait for the UPS to cut power, if the BIOS latches the power off state). If the distribution doesn't do that, then I'd call it a misconfiguration or a bug (since at that point, the packages are doing little more than helping the compilation stage). And with the proliferation of init systems, configuration will probably be distribution-specific from that point on.
See previous comments about not knowing what CentOS does. Debian (wheezy; not sure about jessie yet) and Ubuntu have a "poweroff" action in /etc/init.d/nut-client.
clepple at gmail
More information about the Nut-upsuser