UPS control apcupsd

To install apcupsd from source:
-------------------------------------------------------------------------------
yum install gcc-c++
cd /usr/src
wget http://downloads.sourceforge.net/apcupsd/apcupsd-3.14.3.tar.gz
tar xvzf apcupsd-3.14.3.tar.gz
cd apcupsd-3.14.3
CFLAGS="-g -O2" LDFLAGS="-g" ./configure --enable-usb --with-upstype=usb --with-upscable=usb --prefix=/usr --sbindir=/sbin --with-cgi-bin=/var/www/cgi-bin --enable-cgi --with-css-dir=/var/www/docs/css --with-log-dir=/etc/apcupsd --enable-pthreads --enable-powerflute
make
make install
-----------------------------------------------------------------------------
to check location of apcupsd:
whereis apcupsd

If compiled correctly one of the locations will be /sbin/apcupsd

Then edit UPS device type and connection type:
nano /etc/apcupsd/apcupsd.conf

I use some older model APC Smart UPS 620 with serial interface, so I use
UPSTYPE = apcsmart
UPSCABLE = smart

To start apcupsd monitoring, type:

/etc/init.d/apcupsd start

To check status (including battery runtime etc):
/etc/init.d/apcupsd status