A quick perusal of the .../system/UPS/ directory on your favorite sunsite CD shows three choices. There is powerd-2.0(a daemon to shutdown computers based on serial port signals, signals from remote computers, or pipes from other programs), genpower-1.0.1(highly configurable UPS monitoring software), and apcd-0.5 (which attempts to communicate with APC SmartUPS), all vintage 1995.
Apcd looks interesting, in that it takes advantage of the ascii protocols to collect some of the detailed information that the SmartUPS is capable of producing. There is the slight problem, however, that there are no clues about cable configuration, and there is no way to display all the detailed information that the program collects. It does, however, shut down the computer when power fails.
Powerd also looks good. It is able to read an external configuration file, so one doesn't have to change c code to make it aware of a new UPS or cable configuration. It is able to communicate with a UPC via the serial control signals. It is able to send to, or recieve from, an instance of itself on another computer, for those situations where more than one computer is powered by one UPS. Unfortunately, I was unable to get it to work reliably.
Genpower is limited to communication with a UPS via the serial signals. It is easily configurable by editing a .h file in the unlikely case that your UPS and cable is a total stranger, and old frends are identified by a command line option.
I added the following to genpowerd.h to support the SL Waber UPStart.
/* UPStart multi-power srs */
{"UPStart", {TIOCM_RTS,0}, {TIOCM_DTR,1}, 5, {TIOCM_CTS,1}, {0,0}, {0,0}},
The UPStart comes with a cable, which appears to be a standard DB-9 extension
cable. Power is supplied to the cable from the RTS line, and CTS toggles
when power fails. As far as I can tell, there is no signal when the battery
is running low, and setting RTS will turn off the UPS inverter.
All rights reserved. Not responsible for errors in spelling or facts.
Last Modified: Wednesday, October 10, 1996
Ben Spade /
http://www.spade.com /
mailto:spade@spade.com