This driver supports hardware from many different manufacturers as it only uses the very simplest of signaling schemes. Contact closure refers to a kind of interface where basic high/low signals are provided to indicate status. This kind of UPS can only report line power and battery status.

This means that you will only get the essentials in ups.status: OL, OB, and LB. Anything else requires a smarter UPS.

Required. Configures the driver for a specific kind of UPS. See the UPS Types section below for more information on which entries are available.

mfr=string

Optional. The very nature of a generic UPS driver sometimes means that the stock manufacturer data has no relation to the actual hardware that is attached. With the mfr setting, you can change the value that is seen by clients that monitor this UPS.

model=string

Optional. This is like mfr above, but it overrides the model string instead.

serial=string

Optional. This is like mfr above and intended to record the identification string of the UPS. It is titled "serial" because usually this string is referred to as the serial number.

sdtime=value

Optional. The driver will sleep for this many seconds after setting the shutdown signal. This is necessary for some hardware which requires a sustained level to activate the shutdown sequence.

The default behavior of the driver is to exit immediately. If this doesn’t reliably trigger a shutdown in your UPS hardware, use this setting to give it more time to react.

Note

very large values for sdtime may create warnings from upsdrvctl if it gets tired of waiting for the driver to return.

The essence of a UPS definition in this driver is how it uses the serial lines that are available. These are the abbreviations you will see below:

OL

On line (no power failure) (opposite of OB - on battery)

LB

Low battery

SD

Shutdown load

CP

Cable power (must be present for cable to have valid reading)

CTS

Clear to Send. Received from the UPS.

RTS

Ready to Send. Sent by the PC.

DCD

Data Carrier Detect. Received from the UPS.

RNG

Ring indicate. Received from the UPS.

DTR

Data Terminal Ready. Sent by the PC.

ST

Send a BREAK on the transmit data line

A "-" in front of a signal name (like -RNG) means that the indicated condition is signaled with an active low signal. For example, [LB=-RNG] means the battery is low when the ring indicate line goes low, and that the battery is OK when that line is held high.

Many different UPS companies make models with similar interfaces. The RUPS cable seems to be especially popular in the "power strip" variety of UPS found in office supply stores. If your UPS works with an entry in the table above, but the model or manufacturer information don’t match, don’t despair. You can fix that easily by using the mfr and model variables documented above in your ups.conf(5).

If your UPS isn’t listed above, you can try going through the list until you find one that works. There is a lot of cable and interface reuse in the UPS world, and you may find a match.

To do this, first make sure nothing important is plugged into the outlets on the UPS, as you may inadvertently switch it off. Definitely make sure that the computer you’re using is not plugged into that UPS. Plug in something small like a lamp so you know when power is being supplied to the outlets.

Now, you can either attempt to make an educated guess based on the documentation your manufacturer has provided (if any), or just start going down the list.

Disconnect the UPS from the wall/mains power. This is easiest if you have a switched outlet in between it and the wall, but you can also just pull the plug to test. The lamp should stay lit, and the status should switch to "OB". If the lamp went out or the status didn’t go to "OB" within about 15 seconds, go to Step 1. Otherwise, continue to Step 4.

At this point, we know that OL and OB work. If nothing else beyond this point works, you at least know what your OL/OB value should be.

Wait for the UPS to start complaining about a low battery. Depending on the size of your UPS battery and the lamp’s bulb, this could take awhile. It should start complaining audibly at some point. When this happens, STATUS should show "OB LB" within 15 seconds. If not, go to Step 1, otherwise continue to Step 5.

With the UPS running on battery, run the genericups driver with the -k switch to shut it down.

genericups -x upstype=n -k /dev/port

If the UPS turns off the lamp, you’re done. At this point, you have verified that the shutdown sequence actually does what you want. You can start using the genericups driver with this type number for normal operations.

You should use your findings to add a section to your ups.conf. Here is a quick example:

If the above testing sequence fails, you will probably need to create a new entry to support your hardware. All UPS types are determined from the table in the genericups.h file in the source tree.

On a standard 9 pin serial port, there are 6 lines that are used as the standard "high/low" signal levels. 4 of them are incoming (to the PC, from the UPS), and the other 2 are outgoing (to the UPS, from the PC). The other 3 are the receive/transmit lines and the ground.

Be aware that many manufacturers remap pins within the cable. If you have any doubts, a quick check with a multimeter should confirm whether the cable is straight-through or not. Another thing to keep in mind is that some cables have electronics in them to do special things. Some have resistors and transistors on board to change behavior depending on what’s being supplied by the PC.

The Centralion CL series may power down the load if the driver starts up with the UPS running on battery as the default line settings contain the shutdown sequence. - Neil Muller

The Tripp-Lite Internet Office 700 must be used with the black 73-0844 cable instead of the gray 73-0743 cable. This entry should work with any of their models with the Lan 2.2 interface - see the sticker by the DB9 connector on the UPS. - Stephen Brown

Type 5 should work with the Tripp-Lite Lan 2.1 interface and the 73-0724 cable. This was tested with the OmniSmart 675 PNP on Red Hat 7.2. - Q Giese

There is no way to reliably detect a contact-closure UPS. This means the driver will start up happily even if no UPS is detected. It also means that if the connection between the UPS and computer is interrupted, you may not be able to sense this in software.

Most contact-closure UPSes will not power down the load if the line power is present. This can create a race when using slave upsmon(8) systems. See the upsmon(8) man page for more information.

The solution to both of these problems is to upgrade to a smart protocol UPS of some kind that allows detection and proper load cycling on command.