Followup to: UPS initiated autoshutdown

Daniel Ray norstar at tnl.UUCP
Thu Jul 20 11:09:37 AEST 1989


In article <462 at cals01.NEWPORT.RI.US>, cals at cals01.NEWPORT.RI.US (Charles A. Sefranek) writes:
> 
> Something about this always bothered me -- is there any way to tell the UPS
> to turn off after the computer has been shutdown cleanly?  It seems a shame
> to run the UPS battery into the ground during a prolonged power outage,
> especially if the computer could be safely powered down at that point. This
> assumes of course that everything is unattended, like at 2:00 AM on a cold
> winter day with three feet of fresh snow covering your driveway.. :-)
> --
>  Charlie Sefranek	cals at cals01.NEWPORT.RI.US
> UUCP: {rayssd,xanth,lazlo,mirror}!galaxia!cals01!cals

This and an email message I received pointed out several less-than-desirable
outcomes for a UPS-protected system during a blackout, as I have in place on
my system. I'll go through them now:

A. Single very short duration power glitches (95% of all failures are this
type here in Burlington). The power goes out for a few seconds. The UPS
switches to battery power and then back to AC. The system would not know that
anything happened, most likely. The UPS battery is not drained much.

B. Long duration blackouts (2% likely here in Burlington). The power goes out
and stays out for at least 20 minutes. The system senses the failure via a
test thru a serial port every minute. Users are warned, and the daemon waits
to retest after another minute. Meanwhile, the UPS is switched to battery
power. The daemon tests again, finds power still out, so starts the auto-
shutdown sequence, leading to shutdown 60 seconds later. Now the system is
down, but not turned off physically. Battery power continues to drain, until
after 10-20 minutes the UPS shuts off power to prevent the battery from
being overdrained. This shuts off the CPU. Sometime later, power is restored.
The system restarts as from a power off condition, reboots, and is up. The
UPS slowly recharges its battery, but this takes hours. The weakness is that
a second power failure would occur, and that the system would not have the
minimum 2-3 minutes required for shutdown, causing a crash. If the system
knew that it just came up from a power failure, it could change the daemon
to use 'haltsys' at the first sign of a second blackout. After say a day,
it could go back to the normal 2 minute cycle. (This also demonstrates the
wisdom of using only a very short waiting period between when the daemon
senses an outage and when it starts a shutdown. I think 1 minute is good,
so that a second power failure with a partially recharged UPS battery might
last long enough for system shutdown).

C. Intermediate duration outages (3% likely). The power is off for from two
to twenty minutes, such that the UPS battery power is never out, but the
system *did* shutdown via the daemon process. The UPS is never overdrained,
but the system never reboots either. After the AC power is restored, the
system continues to sit there until a human intervenes. This is not very
likely since virtually all power failures are of type A above. But if it
happens, no provisions are in place to restart the system.

Probably some more expensive UPSs are available that can deal with type C.
But by protecting against the very short failures, I still protect the
system almost fully from blackouts. Almost.

I think that I am going to create the power sensor/daemon myself. I need
to save money, and I'll learn something. If I come up with anything good,
I'll give it to the net.

norstar
The Northern Lights, Burlington Vermont             |      Awaking from a
tnl dialins: 802-865-3614 at 300-2400 bps.        ` | /    dream of waking
------------------------------------------      --- * ---  up. Dream of a
uucp: uunet!uvm-gen!tnl!norstar or                / | .    dream of a dream!
{decvax,linus}!dartvax!uvm-gen!tnl!norstar          |      



More information about the Comp.unix.questions mailing list