[lug] apm/UPS

John Karns jkarns at csd.net
Wed Aug 21 12:00:45 MDT 2002


On Fri, 2 Aug 2002, David Morris said:

> On Fri, Aug 02, 2002 at 11:53:07AM -0600, D. Stimits wrote:
> > I'm looking at an UPS for the Linux bridge and cable modem. Obviously,
> > cable modems do not have any "auto power down" feature (nor would the
> > modem need it, but not totally depleting a battery's power is good for
> > the life of the battery). In the case of the bridge machine, it is
> > older, and does not support having the o/s power itself down, it has a
> > good old-fashioned switch. However, in the case of the Linux machine, I
> > can probably rewrite some of the UPS scripts for apmd, so that it starts
> > out by changing the ext3 journal speed from 5 second intervals to 1
> > second intervals; and then if time goes far enough, either remount the
> > drives read-only, except for /var/, or else run init 0 to halt when
> > things get really close.
>
> I cannot speak for the batter depleation question, but just
> as an FYI on the above, a system that does not power-off
> upon shutdown is actually preferable if you are looking to
> maximize uptime.  So long as you have a UPS that talks to
> the OS (and that is a function of the OS and the UPS, not
> the system), you can get Linux to shut itself down.  Then,
> after the system has shut itself down, the power is still
> on.  This way, when power is restored, your system will
> power itself back on automatically, and it will be up and
> running without your intervention.
>
> NOTE:  As I said at the top, the below is far beyond what I
> can say with any certainty.  Don't flame me if I am don't
> have a single fact straight, this is simply how I understand
> the situation....an understanding which could be completely
> wrong!

AFAIK there are basically two types of UPS's, smart and dumb.  The smart
variety commonly use a proprietary protocol of status and control codes
which are interpreted by a mfr supplied utility to show status and set the
operating parameters of the UPS.  Some yrs ago my employer had a Best
FerrUPS which would be classified as smart, but it used a simple menu
based paradigm which didn't require anything more than a terminal emulator
to access.

The smart units can be set to shut themselves down after a specifiable
charge has been reached by the unit via an internal bettery monitoring
subsystem, thus avoiding a complete discharge of the battery.

The dumb units typically also connect to the computer via a 9-pin serial
port, but instead of sending ASCII based codes it merely changes the
steady-state voltage of one or two pins via a relay.  This indicates when
the unit is running from the battery / inverter.  Many of this type of
units include the ability to shut down the inverter by changing the state
of one of the pins.  So it is possible to control a dumb UPS in a manner
similar to a smart UPS, not by monitoring the state of the battery but
based on a time interval.  The big difference then between the smart and
dumb types is that the smart UPS *shuts itself down* whereas the dumb
type requires an external signal to do so.

The older AT style PC power supplies utilized a simple single pole single
throw switch to switch the ps on / off.  Many of the newer ATX supplies
can be set to return to the last power state upon application of the
external AC power to the unit.  So with this capability as with the AT
ps's, one can have a dumb UPS shut down before battery depletion, and have
the machine auto-power on when power is restored - which provides a high
degree of reliability and fault tolerance regarding external power
conditions.  Also, with this type of configuration, IMO the extra expense
of a smart UPS provides marginal benefits, unless it is of significant
importance to be able to monitor the state of the UPS battery.

Also, apm need not be a part of the control loop with these types of
configurations.

----------------------------------------------------------------
John Karns                                        jkarns at csd.net





More information about the LUG mailing list