Archive for July, 2006

APC-UPS testing

Posted in Fedora, Linux SysAdmin on July 14th, 2006 by Johan Huysmans – Be the first to comment

Today I tested an APC Smart-UPS 750.

Both the serial and usb cable are connected to my laptop, no devices are taking power of the ups.
I first tried the PowerChute from APC, It installed correctly but it doesn’t want to connect to the ups. It seems it can only connect over ttySx but even when that cable is in place I still got some strange errors in my log files.
I unplugged the power cable of the ups to let it run on battery, no changes appear in those log files.

At that moment I noticed this:

FC5 recognised the ups through usb.

Google took me to the site of apcupsd. The project looks nice, let’s test it.

[root@raskas ~]# yum install apcupsd
[root@raskas ~]# /etc/init.d/apcupsd start
[root@raskas ~]# /etc/init.d/apcupsd status
CABLE    : USB Cable
MODEL    : Smart-UPS 750
UPSMODE  : Stand Alone
STATUS   : ONLINE
LOADPCT  :   0.0 Percent Load Capacity
BCHARGE  : 100.0 Percent
...

… nice :)

Again I unplugged the power cable of the ups.
I got this in my console:

Broadcast message from root (Fri Jul 14 14:30:16 2006):
Warning power loss detected on UPS raskas.ocean.be

Broadcast message from root (Fri Jul 14 14:30:22 2006):
Power failure on UPS raskas.ocean.be. Running on batteries.

and this in my /var/log/messages

Jul 14 14:30:16 raskas apcupsd[15487]: Power failure.
Jul 14 14:30:21 raskas apcupsd[15487]: Running on UPS batteries.

After connecting the ups to the power i got this message:

Broadcast message from root (Fri Jul 14 14:32:23 2006):
Power has returned on UPS raskas.ocean.be...

and this in my /var/log/messages

Jul 14 14:32:22 raskas apcupsd[15487]: Mains returned. No longer on UPS batteries.
Jul 14 14:32:22 raskas apcupsd[15487]: Power is back. UPS running on mains.

You can define and fine-tune the actions from apcupsd in /etc/apcupsd/. In the file /etc/apcupsd/apccontrol you can find all states and all actions, in the /etc/apcupsd/apcupsd.conf file you find the main configuration.