This post is not a question but a comment on my positive experience with apcupsd and an APC UPS model BE550G. I have been administering my own Linux server for about one and a half months now and I am still amazed by the software solutions available for Linux, their stability, and their quality.
This post is not intended to replace the manual. Please read the manual at http://www.apcupsd.org.
I installed the APC BE550G with the USB cable. I did not have to change anything about the USB configuration. Viewing the /var/log/message file, I could see that my system immediately recognized the UPS.
I installed all the apcups packages. These packages were already available in the Fedora 10 repository so I didn't have to search the web for them.Code:Feb 12 20:39:22 srv1 kernel: usb 3-2: new low speed USB device using ohci_hcd and address 2 Feb 12 20:39:22 srv1 kernel: usb 3-2: configuration #1 chosen from 1 choice Feb 12 20:39:22 srv1 kernel: hiddev96hidraw3: USB HID v1.10 Device [APC Back-UPS ES 550 FW:843.K1 .D USB FW:K1 ] on usb-0000:00:12.0-2 Feb 12 20:39:22 srv1 kernel: usb 3-2: New USB device found, idVendor=051d, idProduct=0002 Feb 12 20:39:22 srv1 kernel: usb 3-2: New USB device strings: Mfr=3, Product=1, SerialNumber=2 Feb 12 20:39:22 srv1 kernel: usb 3-2: Product: Back-UPS ES 550 FW:843.K1 .D USB FW:K1 Feb 12 20:39:22 srv1 kernel: usb 3-2: Manufacturer: APC Feb 12 20:39:22 srv1 kernel: usb 3-2: SerialNumber: 3B1806X32856
You can (and should) find a description of these packages at http://www.apcupsd.orgCode:apcupsd.x86_64 3.14.4-2.fc10 installed apcupsd-cgi.x86_64 3.14.4-2.fc10 installed apcupsd-gui.x86_64 3.14.4-2.fc10 installed
These are the steps I had to take to get my system to shutdown gracefully when the UPS is exhausted and then automatically reboot when the power is restored to the UPS...
1) start the apcupsd daemon manually. It is not started by the installation
2) configure the apcupsd daemon to start automatically at each bootCode:sudo service apcupsd start
3) Edit the system halt script (see comment below)Code:sudo chkconfig apcupsd on
4) Change my motherboard BIOS settings to "Restore on AC Power Loss" --> "Always On"Code:sudo vi /etc/rc.d/init.d/halt
Relating to step 3 above -- The manual for apcupsd states that the halt script should be automatically modified by the installation of apcupsd. This automatic alteration did not occur during my install. See the manual at http://www.apcupsd.org for a description of the modification to the halt script. I found it interesting that my halt script did already contain some code (below) related to shutting down the UPS drivers. I poked around and found that "/etc/sysconfig/ups" and "/sbin/upsdrvctl " do not exist on my system. I added the apcupsd modification immediately after the code shown below.
THE CODE BELOW IS NOT THE HALT SCRIPT MODIFICATION FOR APCUPSD!! See the manual at http://www.apcupsd.org for that code.
One more step that I took was to copy the cgi scripts to my cgi-bin directory.Code:# Shutdown UPS drivers if [ "$command" = /sbin/halt -a -f /etc/sysconfig/ups ]; then . /etc/sysconfig/ups if [ -z $POWERDOWNFLAG ]; then POWERDOWNFLAG=/etc/killpower fi if [ "$SERVER" = "yes" -a -f $POWERDOWNFLAG ]; then /sbin/upsdrvctl shutdown fi fi
Then I could type http://<myhost>/cgi-bin/multimon.cgi into my web browser and see my UPS status on a web page.Code:sudo cp /var/www/apcupsd/* /var/www/cgi-bin
At that point my UPS installation was done and successfully tested.
Other comments...
I was confused for a little while about the source of the icons in the tray. When I first plugged in my UPS, an icon appeared in the icon tray at the top of the desktop to the left of my name. At some point during my testing, this icon disappeared and did not return. It turns out after some digging that this icon is from "the Gnome Power Management" (GPM) app which recognizes and supports my UPS model. I may have been able to accomplished everything (possibly even easier) with GPM, but I don't know if GPM will let me view my UPS status over a web page so I'm going to stick with apcupsd (even though the GPM icons are "cleaner" looking than the apcupsd icons in my opinion). At some point during the install/testing, GPM must have detected that my UPS was managed by a different driver because it now seems to have no knowledge of my UPS.
Another thing that confused me for a short time is the power-off of the UPS itself. As part of a UPS shutdown, the halt script turns off the UPS itself (which is the purpose of the halt script modification mentioned earlier). If the UPS power-off step does not occur, then my system does not reboot when power is restored to the UPS. (Why? How does the computer know the difference if its power is off either way?) The UPS is programmed to delay between receiving the power-off command and actually powering off. The default delay for my unit is 20 seconds. I was unaware of this delay (because I didn't read the manual), so I plugged the UPS unit back-in during my testing before the end of the delay. As a result, the UPS had not powered off and my system did not reboot when power was restored. When I realized this, I waited for the UPS to power of (truncated beep, power light goes out), then I plugged the UPS back in, and my system rebooted automatically.
My thanks to the developers of acpupsd. As I stated earlier, I continue to be amazed by the software solutions available for Linux, their stability, and their quality.
My setup...
cpu: AMD Athlon64 X2
motherboard: ASUS M2A78-CM
distro: Fedora 10
desktop: Gnome
ups: APC BE550G (using apcupsd)
--Scott


Reply With Quote
