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

Mark E. Hansen meh at Winfirst.Com
Tue Nov 20 15:12:39 UTC 2007


On 11/19/07 18:06, Whit Blauvelt 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?

This is how I understand it.

> 
> 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.

I'm not really clear on this, but I think that's what may actually be
happening. All I know is that after sending this command to the UPS, the
power to the PC is cut, and when I restore line power to the UPS, power to
the PC is restored.


> 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? 

When you tell the UPS to kill the power (whether this results in killing the
power only to the PC or actually shuts the UPS down), the power to the PC
is restored once line power is restored to the UPS.

> 
> Best,
> Whit
> 
> On Mon, Nov 19, 2007 at 01:07:59PM -0800, Mark E. Hansen wrote:
>> On 11/19/07 12:46, Whit Blauvelt wrote:
>> > Hi,
>> > 
>> > In an instance where the system is in a sometimes-unattended facility, are
>> > there different implications to shutting down the UPS from a script, as
>> > compared to not doing so? My goal is to have systems recover ASAP when the
>> > power comes back. My UPS is a Cyberpower 1500AVR. The two servers connected
>> > to it boot fine when power is restored to them. But I'm ignorant on how the
>> > UPS itself will behave. If shut down, do UPS's as a rule turn on when power
>> > comes back? Or does that depend on the model? 
>> > 
>> > Is there an argument for not shutting the UPS down, just in case power comes
>> > back before it's run out of battery even to sustain even its own state?
>> > 
>> > Thanks,
>> > Whit
>> 
>> I'm not a UPS expert (or NUT for that matter), but just went through all this
>> with my CyberPower AVR1200 connected to a Linux machine.
>> 
>> First, I assume that you have the NUT package configured such that when the
>> line power fails, the UPS will cause the PC to shutdown. If you allow the
>> PC to shut all the way down, then it likely won't boot back up when the line
>> power returns.
>> 
>> What you need to do is to tell the UPS to kill the power to the PC just before
>> the machine completes the shutdown sequence. This way, your machine's shutdown
>> scripts will be able to do everything they need to do, like kill all the
>> applications, sync the drives, etc., and then tell the UPS to kill the power
>> to the PC.
>> 
>> Because the PC's shutdown script tells the UPS to kill the power to the PC, the
>> PC's BIOS thinks the PC was "up" when it's power failed. Then, once line power is
>> returned to the UPS, it will restore power to the PC, and the PC will boot up as
>> usual.
>> 
>> Unfortunately in my case (CentOS 4.5) I had to do a fair amount of twiddling
>> with my machine's shutdown script (/etc/init.d/halt) to get it to do this. It
>> certainly didn't work "out of the box".
>> 
>> Let me know if you have any questions, as I may not have understood your
>> request.
>> 
> 
> _______________________________________________
> Nut-upsuser mailing list
> Nut-upsuser at lists.alioth.debian.org
> http://lists.alioth.debian.org/mailman/listinfo/nut-upsuser
> 



-- 
Mark Hansen, PP-ASEL, Instrument Airplane, USUA Ultralight Pilot
Cal Aggie Flying Farmers
Sacramento, CA



More information about the Nut-upsuser mailing list