UPS, automatic shutdown and Linux

Last updated $Date: 2000/04/01 00:56:25 $ UTC.

Background

In January 1999, during a snow storm, parts of North NJ lost power for over 8 hours. My boss's home network was down as a result. Luckily, he had all his machines on a 650VA TrippLite BC-Pro UPS. He did manage to shut down all the machines in time. Afterward, we decided to set up Linux to automatic shutdown when the battery of UPS is low.

Resources

Here is a summary of my experience scouring for information on getting Tripp Lite's to work with Linux. Incidentally, a few months after I started the search, I was so fed up with the lack of support for Tripp Lite. I switched our vendor to APC.
Dejanews
This is one of my favorite places to start looking. People may ask questions and "talk", before taking the time to put the same info on the web. This also tends to have the most "current" information.

Total of 22 hits for "Linux Tripp Lite", dating back to 1995. From the 22 postings, there was no detail on getting Tripp Lite to work, but lots of stuff regarding APC turned up.

Linux UPS-HowTo
<http://metalab.unc.edu/LDP/HOWTO/UPS-HOWTO.html>
I love the Linux documentation project. Just about every aspect of Linux is documented there some how.

Unfortunatly this page is quite dated though. It hasn't been updated since November 1997.

There is a diagram of the pinouts for TrippLite BC750LAN (Standby UPS) by Tom Webster <webster@kaiwan.com>, the author of the genpower package.

Interestingly enough, Tripp Lite no longer carries BC 750 LAN on their catalog, so I couldn't compare it with the BC Pro (600, 850, 1050, 1400). This does point me to genpower as a package to try.

I tried genpower with the TrippLite OmniStart 675 PnP that I got from Price Club. It didn't work correctly for me. But I did notice the package is fairly well set up.

Altavista
This is probably one of the most comprehensive search engine out there in term of the raw amount of documents indexed. It's also blazing fast. The hardware behind it is a marvel of Digital (now Compaq) technology, multiprocessor Alpha's, giga bytes of solid state disks.

Out of the 110 links I browse through, the following 3 additional pages seem useful.

Computer Craft UPS FAQ
<http://www.computercraft.com/docs/ups.html>
This has a good coverage of general informations on UPS.

PC Clone Unix Hardware Buyer's Guide by Eric Raymond
<http://www.tuxedo.org/~esr/clone-hw-guide/power.html>
This is very useful specifically for unix users on PC's. He is very enthusiastic about Tripp Lite's. He used to like APC, but not any more because of their not releasing specs (see more about this later).

I personally am not very thrilled with TrippLite. I emailed their tech support because their Power Alert package for Linux doesn't extract correctly. The installation script does a "cpio", and the command line options were incorrect. It took over a week before I got a response. If a vendor can't respond to email request in a reasonable fashion, IMHO, one shouldn't bother with them. Eventually I did get the Power Alert package to work--no thanks to TrippLite's tech support.

Tripplite Power Daemon for RedHat
<http://www.mycal.net/network/ups.html>
The first version was written for RedHat 4.2. The only problem is (as indicated at the bottom of the page):
     More Redhat 5.0 problems

     Powerd is now broken again on redhat 5.0 if you upgrade the glibc
     libraries. I haven't had time to look at this issue yet.

     Mycal Labs, Updated May 1998 
So it's not ready for RedHat 5.x.
Network UPS Tools by Russell Kroll
This used to be called SmartUPSTools. It is being actively maintained by Russel Kroll. It supports several different brands of UPS, including APC, Best Power, etc. It is very well done, and has a web interface (CGI) that supports monitoring multiple UPS' simultaneously. I highly recommend this. I have used this with APC SmartUPS 1000VA, 2200VA, and 3000VA.

The recent versions even supports a client server mode, where other machines can poll the UPS host (the machine that has the serial connection to the UPS) for the UPS status, and shutdown when the UPS is both on battery and the battery is low. The only problem I have found is that there doesn't seem to be a way to set a threashold for what's considered low battery. For example, I have had situations where the UPS doesn't provide long enough run time when it reaches the low battery state to allow a graceful shutdown. Then again, as the documentation points out, one can always write a script to check the status returned from the UPS monitor and initiates the shutdown.

It may be of interest that APC also released it's PowerChute software for Linux. Personally, I am not very thrilled about it. It's still not open source. But it's a step.

Over all, I find scant information on Tripp Lite. I looked through about 10 different packages listed on the UPS-HOWTO. Many of the support APC SmartUPS, and Best UPS. Tripp Lites are supported by two packages:

http://sunsite.unc.edu/pub/Linux/system/ups/genpower-1.0.1.tgz
http://metalab.unc.edu/pub/Linux/system/ups/smartups-1.1.tgz

The problem is that I don't think Tripp Lite BC Pro is considered a "smart" UPS. A smart UPS sends out informaiton such as temporature and voltage. Tripp Lite has a separate SmartPro line for that.

So this boils down to genpower and the PowerAlert Plus package from Tripp Lite. And we have PowerAlert Plus working.

Support

There are really 2 kinds of support, vendor and users.

User Support

Most of these packages available are user contributed. As I previously pointed out, there are many for APC and Best UPS.

Vendor Support

Vendor support is mainly referring to how much spec they release. Out of the top 3, APC, Best, and TrippLite. Best is the "best" of them all. The driver is open source. APC has been criticized much for their unwillingness to release specs. Thankfully, the specs were reverse engineered, since apparently APC UPS's are fairly popular. As as of the end of 1999, APC's PowerChute software was released for Linux.

Incidentally, PC magazines in general rate APC's very well. In the future, I would seriously consider Best as well.

Conclusion

I would suggest having all your machines on UPS or line conditioners. There are quite a few models around the price of $200, that can supply 600-750VA, e.g., Best PatriotPro 750VA ($211), APC Smart-UPS Net620 ($240), etc. It's well worth the money. Pay special attention to a few points in the specifications. I will use APC as an example.
Load
First, you need to know how much load you are going to put on this UPS. A typical PC comes with a 225-300W power supply. For example, a midtower may have a 250W power supply. It doesn't mean that it has that much load. It depends on how many harddrives, and other devices on the machine. It simply means that the power supply can support a maximum of 250W. There is also a matter of whether you want to put the monitor on the UPS as well. Monitors tend to be heavy loads. Then again, one does need the monitor on in order to do a shutdown.

As a rule of thumb, I estimate 100VA (65W) per workstation, excluding the monitor.

Run time
Once you know how much load the UPS needs to support, you can decide the length of run time on battery. IMHO, 10 minutes is the minimum for an orderly shutdown, 30 minutes is preferable. APC has a runtime chart for the Smart UPS'. For example, if I want to put 4 PC's on a UPS, and I would like the battery to run for an hour. I would estimate a 400VA load, with a run time of 1 hour, and the table shows that a SU1400 can sustain that.
Transfer time
This tells you how long does it take for the UPS to kick in, after a power outage. "2ms" is typical for a higher end model. If it's longer than 10ms, devices such as modem may experience problems.
Waveform
A "pure" sineware is the best. The cheaper models frequently features "stepped approximation to a sine wave", e.g., Back-UPS.
Size and Weight
A UPS tends to be heavy mostly because of the battery. For example, SU1000net weighs 42 lbs. I have had users declining to have a higher capacity UPS because it's simply too heavy. For example, a SU2200net weights 112 lbs. Dimension wise, SU1000net and SU1400net are both only 8.5" tall, and take up relatively little space. SU2200net and SU3000net on the other hand are twice as tall, and deeper. Keep this in mind if you are planning to send some of these equipments to your users' homes.
Incremental cost
If you are planning for the long term and there are some flexibility in terms of budgeting, it's worth while to do an incremental cost benefit analysis. For example, we will use the APC SmartUPS models, and some theoretical prices. As one can see 2200net presents the lowest $/VA, and a low increment dollar per incremental VA ratio. There is a huge incremental cost upgrading from 2200net to 3000net. Based on this, it seems that 2200net is a good buy.
model# Price $/VA Inc.$/Inc.VA
1400net $599.99 $0.43
2200net $875.99 $0.40 $0.35
3000net $1436.99 $0.48 $0.70

Here is an interesting Note I found from Fenton (another UPS vendor) web site.

http://www.fentonups.com/ppal.htm

Every PowerPal model has built-in voltage correction for brownout protection - "boosts" low voltages and "bucks" high voltages, extends battery life, and reduces stress on your electronic equipment. Don't be fooled by other UPS companies' confusing product lines: APC's Back-UPS models and Tripp Lite's various BC models do NOT provide voltage correction. For APC and Tripp Lite, you have to at least buy the Back-UPS Pro or the OmniSmart in order to get this valuable feature.


Peter Chen <petechen@remus.rutgers.edu>
$Id: UPS.html,v 1.3 2000/04/01 00:56:25 petechen Exp $