[Nut-upsuser] UPS shutdown - always the thing to do?

Charles Lepple clepple at gmail.com
Tue Nov 20 03:53:11 UTC 2007


On Nov 19, 2007 9:06 PM, Whit Blauvelt <whit+nut at transpect.com> wrote:
> Mark,
>
> Thanks. That helps clarify my question. Okay, so Nut picks up the signal
> from the UPS that it's time to shut down the PC. The PC does its shutdown,
> and then from the Nut install doc "You should configure your system to power
> down the UPS after the filesystems are remounted read-only." What you're
> suggesting is that the "shutdown" command to the UPS is really not telling
> the UPS to power down itself, but to power down the PC?

If I understand Mark correctly, he is referring to how you can avoid
issues with some BIOS settings by using "upsdrvctl shutdown" to
command the UPS to pull power from the PC *before* the normal OS
shutdown scripts can tell APM or ACPI to perform a soft poweroff.

The normal Linux "poweroff" command is what usually gets you into
trouble - older BIOSes that do not have the "always power on when
power's restored" option will assume that, by running poweroff, you
meant for it to stay off even if the power comes back. Cutting the
power before that happens means that the internal power toggle is more
likely to remember its state as being "on" when the power comes back.

> Because I was taking that literally as telling the UPS to power itself down.
> That's why I was asking if the UPS by default would power itself back up.
> Because I don't recall that just plugging it in is enough to turn it on -
> there's that button on it that needs pressing. But if the "shutdown" command
> to the UPS really means "cut power to the PC, but stay on yourself on the
> rest of your residual power (or come back on when wall power comes back)" -
> well that's a very different scenario.
>
> My PC bios has the option enabled to turn on on power restoration, no matter
> what the state was when power was turned off. Even so, if they shut
> themselves down, but then don't see the power cycled from the UPS end, that
> would be a problem. So does that "/usr/local/ups/bin/upsdrvctl shutdown"
> command really tell the UPS "power down the output, but only until power's
> back at the wall, then repower"? That is, it's not just telling the UPS to
> turn itself off, awaiting a human finger go to on again?

Now you're getting into the driver-specific portion of NUT.

Are you using the powerpanel or cyberpower driver? (Not that I can
answer authoritatively on this, but we might be able to find some
clues in the code as to whether the signal sent to the UPS takes into
account the race condition you described in your next message.

-- 
- Charles Lepple



More information about the Nut-upsuser mailing list