More modern units (most of ours are made by APC) connect right to a USB port (this is good). Older units have a DB-9 serial port and connect to a PC serial port or via a dongle to a USB port.
Our systems use the nut package, which seems to be a manufacturer agnostic UPS support package for linux. This is available via yum for our fedora systems, you want to install two packages:
yum install nut nut_clientAlternately you can download the APC proprietary "PBE powerchute" software for linux. I tried this and it immediately got into a snit about Java versions, so I gave up on it. Why fuss with this when you can use nut.
The config files for nut are:
/etc/sysconfig/ups /etc/ups/upsd.conf /etc/ups/ups.conf /etc/ups/*
The key pieces of software to run nut are:
/sbin/upsdrvctl /usr/sbin/upsd /usr/bin/upsc
As of version 2.4.1 of nut, it spews out messages that the ACL and ACCEPT commands have been replaced by LISTEN, but there is no documentation about any of this.
The whole shebang gets launched by a couple of lines in /etc/rc.local:
upsdrvctl -u root start myups upsd -u root
To see if things are working, try this:
upsc myups@localhost
Adventures in Computing / [email protected]