old-www/HOWTO/UPS-HOWTO/x142.html

524 lines
15 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML
><HEAD
><TITLE
>UPS Basics</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
REL="HOME"
TITLE="UPS HOWTO"
HREF="index.html"><LINK
REL="PREVIOUS"
TITLE="An Overview of Power Protection"
HREF="x71.html"><LINK
REL="NEXT"
TITLE="Testing Your UPS"
HREF="testing.html"></HEAD
><BODY
CLASS="sect1"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>UPS HOWTO</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="x71.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="testing.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="sect1"
><H1
CLASS="sect1"
><A
NAME="AEN142"
></A
>3. UPS Basics</H1
><DIV
CLASS="sect2"
><H2
CLASS="sect2"
><A
NAME="AEN144"
></A
>3.1. How To Select A UPS</H2
><P
>UPSes are nowadays very inexpensive. In the U.S. in 2006, quite
capable ones are available for less than $100, and prices are heading
down. In fact prices are so low now that we're not going to walk you through
the elaborate optimization step that would have been important
even two or three years ago, of estiming the watt dissipation of your
computer and matching it to a UPS rating. Instead we'll explain
why this would be a waste of effort and how to buy in a simpler
and more effective way.</P
><DIV
CLASS="warning"
><P
></P
><TABLE
CLASS="warning"
WIDTH="100%"
BORDER="0"
><TR
><TD
WIDTH="25"
ALIGN="CENTER"
VALIGN="TOP"
><IMG
SRC="../images/warning.gif"
HSPACE="5"
ALT="Warning"></TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
><P
>Bear in mind that the UPS systems that you're likely to buy in a
store or computer catalog are <EM
>not</EM
> intended for safety
or life-critical equipment. These devices should be considered to be pieces
of consumer electronics. As such, the number-one basis on which most of these
devices compete with each other is on price, not quality.</P
><P
>Cost-effectiveness is more important to UPS vendors (because it
appears to be more important to their customers) than ultimate
reliability. If your life depends on computer uptime, you need a special
purpose, online, big, redundant, expensive system. These systems are beyond
the scope of this document. When you buy a UPS at your local computer
store, you are <EM
>not</EM
> buying this sort of system.</P
></TD
></TR
></TABLE
></DIV
><P
>UPSes are rated by the watts a full battery can put out before
it drains. However, they are marketed using a VA (voltage-amps)
figure; often, consumer-grade UPSes don't even specify a wattage on
the box where you can see it. This is because the VA figure is larger
and looks sexier. As a rule of thumb. assume the wattage is half of
the VA rating; for an explanation of the complexities involved (if you
care) see the white paper <A
HREF="http://sturgeon.apcc.com/whitepapers.nsf/URL/WP-17/$FILE/WP17.pdf"
TARGET="_top"
>Understanding
Power Factor, Crest Factor, and Surge Factor</A
> on the APC
website.</P
><P
>But even if you know the watt rating of the UPS, it is the ratio of
that figure with the wattage dissipation of your computer that
controls the dwell time. Your dissipation is hard to predict; it can
even be effected by things like the size of monitor you use (big ones
can be quite power-hungry).</P
><P
>Manufacturers try to get around this technical thicket by
putting an expected dwell time on the box. But they exaggerate and
even lie about their dwell times a lot (this is called
<SPAN
CLASS="QUOTE"
>"marketing"</SPAN
>). What they'll do is quote you the dwell
time you would get driving a bare minimum system with the disk drives
shut off and a tiny monitor, in much the same way laptop manufacturers
lie about their battery dwell times. The more honest UPS
manufacturers give you a little table showing expected dwell times for
different system configurations (<SPAN
CLASS="QUOTE"
>"desktop"</SPAN
>,
<SPAN
CLASS="QUOTE"
>"tower"</SPAN
>, etc.). As a rule of thumb, assume you will get
about 50% of the dwell time listed on the box for your configuration
type.</P
><P
>My advice is to forget the numbers game. Just go online or to
your local computer store and buy one of the higher-end consumer or
home-office models from APC, Best, Tripp-Lite, Belkin, or some other
reputable manufacturer. Go ahead and grab the model with the longest
dwell time, highest watt rating, or biggest VA number you can find;
the premium for it is not likely to be more than $75 over the
bargain-basement model. I guarantee you will feel very good about
your decision not to pinch pennies come your first extended power
outage.</P
><P
>Perhaps a more compelling reason it is better to over-buy
capacity rather than ending up with a UPS that is too weak for your
power drain is that overstrained UPSes can fail in ugly ways,
including catching fire and exploding.</P
><P
>Be sure you get a <I
CLASS="firstterm"
>line interactive</I
> UPS
rather than the older <I
CLASS="firstterm"
>standby</I
> or
<I
CLASS="firstterm"
>SPS</I
> type. The older technology doesn't
actually filter your power through the battery, so you're not assured
of good voltage conditioning. The main advantage of an SPS (low cost)
has been eroded now that line-interactive UPSes are so inexpensive.
There are other UPS types, but they are either obsolescent or targeted
at large data-center installations. For a detailed discussion of the
different UPS types, see <A
HREF="http://sturgeon.apcc.com/whitepapers.nsf/URL/WP-1/$FILE/WP1.pdf"
TARGET="_top"
>The
different types of UPS systems</A
>, a white paper on the APC
site.</P
><P
>Another important consideration is how your UPS will communicate
with your computer. Do not buy a serial line UPS (one that
communicates via an RS-232C cable). These are passing out of use in
favor of UPS designs that use USB or Ethernet, for the very excellent
reason that RS-232C interfaces are flaky, difficult to configure,
and difficult to debug. Ethernet is overkill for this application;
UPSes simply don't need that kind of bandwidth. We recommend sticking
with USB, which is well-matched in price/performance to this job
and relatively easy to troubleshoot.</P
><P
>Until recently there was an important distinction between
<I
CLASS="firstterm"
>smart</I
> and <I
CLASS="firstterm"
>dumb</I
> UPSes.
Dumb UPSes did voltage-level signaling through individual pins; smart
ones used the link as a primitive character channel and could pass
more status information over it. But if you avoid RS232C UPSes you
will never see a dumb one; indeed, it is likely that by the time you
read this no dumb UPses will be in production any longer.</P
><P
>Some UPSes advertise that they deliver a sinusoidal waveform. Those
that don't may be delivering something more like a square wave or a very
noisy sine wave. There are differing schools of thought about how
important this is. One school of thought holds that one should always run
equipment on the best approximation of sinusoidal input that one can, and
that deviations produce harmonics which may either be interpreted as signal
if they get through a power supply, or may actually damage the
equipment. Another school holds that since almost all computers use
switching-type power supplies, which only draw power at or near the peaks
of the waveforms, the shape of the input power waveform is not
important.</P
><P
>Who's right? We don't know. Nick's opinion is that sinusoidal output
is worth the extra money, especially for on-line UPS systems that
continually provide their waveform to the computer; Eric is inclined to
doubt it matters much with modern power supplies. If you don't know that
your equipment has a switching-type power supply, you certainly might want
to think twice before buying a low quality UPS.</P
><P
>Personally, I (Eric) like APC UPSes (nether Eric nor Nick has any
connection with the company). But this is not the kind of widget for which
manufacturer makes a whole lot of difference as long as you stick with one
of the reputable brands.</P
></DIV
><DIV
CLASS="sect2"
><H2
CLASS="sect2"
><A
NAME="AEN173"
></A
>3.2. Deploying your UPS and other devices: the total picture</H2
><P
>Our recommendation for a production Unix environment is a
configuration like the following:</P
><P
></P
><OL
TYPE="1"
><LI
><P
>An UPS for the computer system. </P
></LI
><LI
><P
>Surge suppression on all phone lines, and also on
serial/parallel lines that leave the room.</P
></LI
><LI
><P
>Line conditioners on any devices not connected to the UPS. If
you do take a power hit, it's cheaper to replace a $50 line
conditioner than a $1500 laser printer.</P
></LI
></OL
><P
>If this is too expensive for you, then downgrade the UPS to
a line conditioner like the TrippLite. But don't go without at least
that. Running unprotected is false economy, because you
<EM
>will</EM
> lose equipment to electrical storms &#8212;
and, Murphy's Law being what it is, you will always get hit at the
worst possible time.</P
><P
>One thing to note is that you typically shouldn't put a laser printer
on the brownout-protected sockets in a UPS &#8212; toner heaters draw
enough current to overload a UPS and cause a shutdown within
seconds. Modern UPSes generally have some plugs that are marked
surge-suppressed but not filtered through the battery; plug your
printer into one of those.</P
><P
>A UPS should be wired directly to (or plugged directly into) the
AC supply (i.e. a surge suppressor is neither required nor suggested
between the wall and the UPS). In addition, a surge suppressor
between the UPS and the equipment connected to it is redundant.</P
></DIV
><DIV
CLASS="sect2"
><H2
CLASS="sect2"
><A
NAME="AEN187"
></A
>3.3. Software Assistance</H2
><P
>Your UPS communicates with your computer so it can gracefully
shut the computer down when an outage has lasted too long for the
battery to cope. In order for graceful shutdown to actually happen,
your computer needs to have a background process &#8212; a daemon, in
Unix terms &#8212; watching whatever messages come over the UPS cable
for the one that says <I
CLASS="firstterm"
>terminate</I
>. Then it
needs to tell the operating system to shut down.</P
><P
>Your UPS probably comes with a CD full of such software. Throw
it away, as (a) most of it will be useless bits written for Windows
systems, and (b) in the unlikely event you get Linux software it will
almost certainly be stale binaries for a version you don't run.</P
><P
>Back in the days of dumb serial-line UPses, there used to be
about half a dozen different open-source UPS monitor daemons:
<SPAN
CLASS="application"
>apcd</SPAN
>, <SPAN
CLASS="application"
>dumbupsd</SPAN
>,
<SPAN
CLASS="application"
>genpowerd</SPAN
>.
<SPAN
CLASS="application"
>powerd</SPAN
>, <SPAN
CLASS="application"
>smupsd</SPAN
>,
<SPAN
CLASS="application"
>usvd</SPAN
> and more. These were fairly stupid
programs for a simple job. Many required you to hand-wire a custom
RS232C cable to get around various evil things that UPS manufacturers
did to their ports in order to lock in customers.</P
><P
>Those days are gone. USB UPSes get rid of the cable-hacking and
hardware klugery, but require a bit more smarts from a monitor daemon.
Accordingly the field has narrowed considerably. There appear
to be only two such projects left standing.</P
><P
>The <A
HREF="http://www.networkupstools.org/"
TARGET="_top"
>Network UPS
Tools</A
> project is a generic UPS monitor daemon that aims to
communicate intelligently with all current UPS designs.</P
><P
><A
HREF="http://www.apcupsd.org/"
TARGET="_top"
>apcupsd</A
> is a daemon
specifically designed for communicating with UPSes made by APC, the
American Power Corporation.</P
><P
>Both are solid, well-run projects. Their development groups are
mutually friendly, and there has been occasional talk of a merger.
Awkwardly, the <SPAN
CLASS="application"
>apcupsd</SPAN
> project is in many ways
the more featureful of the two, with, among other things, better USB
support and better documentation &#8212; but the NUT tools have a cleaner
architecture, more developers, and acceptance in Red Hat and other major
distributions.</P
><P
>My advice is simple; run <SPAN
CLASS="application"
>apcupsd</SPAN
> if
you buy an APC UPS, and the NUT tools if you buy anything else. RPMs
and Debian packages (which will modify your system's boot sequence
appropriately as well as installing the daemon binaries) are available
for both, so installation should be easy either way.</P
></DIV
><DIV
CLASS="sect2"
><H2
CLASS="sect2"
><A
NAME="AEN208"
></A
>3.4. Preparing Your System For Auto-Reboot</H2
><P
>If you are using your UPS to try to keep a DNS/Web/mailserver up
24/7, you will want to make sure the machine can be configured to
boot automatically when it is powered up.</P
><P
>This is not the normal behavior of most computers as shipped
from the factory. Normally after the power is cut and restored, you
must explicitly press a button for the power to actually be turned
on. You can test your computer by powering it down; shutting off the
power (pull the plug); then plugging the cord back in. If your
computer immediately starts up, good. There is nothing more to
do.</P
><P
>If your computer does not start up, manually turn on the
power (by pressing the power on button) and enter your computer's
SETUP program (often by pressing DEL during the power up sequence;
sometimes by pressing F10). You must then find and change the
appropriate configuration parameter to permit instant power
on.</P
><P
>Normally, this is located under the <EM
>BOOT</EM
> menu item, and will be called something
such as <EM
>Restore on AC/Power Loss</EM
> or
<EM
>Full-On</EM
>. The exact words will vary
according to the ROM BIOS provider. Generally you will have three
options: <EM
>Last State</EM
>, <EM
>Power On</EM
>, and <EM
>Power
Off</EM
>.</P
><P
>Some BIOSes do not support such an option. This is idiotically
bad design, but it does happen. If so, your only practical remedy is
to get a new motherboard.</P
></DIV
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="x71.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="testing.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>An Overview of Power Protection</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
>&nbsp;</TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Testing Your UPS</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>