FedoraForum.org - Fedora Support Forums and Community
Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2009
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Thumbs up apcupsd -- Positive Experience

    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.

    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
    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:
    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
    You can (and should) find a description of these packages at http://www.apcupsd.org

    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
    Code:
    sudo service apcupsd start
    2) configure the apcupsd daemon to start automatically at each boot
    Code:
    sudo chkconfig apcupsd on
    3) Edit the system halt script (see comment below)
    Code:
    sudo vi /etc/rc.d/init.d/halt
    4) Change my motherboard BIOS settings to "Restore on AC Power Loss" --> "Always On"

    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.
    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
    One more step that I took was to copy the cgi scripts to my cgi-bin directory.
    Code:
    sudo cp /var/www/apcupsd/* /var/www/cgi-bin
    Then I could type http://<myhost>/cgi-bin/multimon.cgi into my web browser and see my UPS status on a web page.

    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

  2. #2
    Join Date
    Feb 2004
    Location
    Switzerland
    Age
    50
    Posts
    210
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for sharing man

Similar Threads

  1. Anybody using Apcupsd ?
    By cadcrazy in forum Using Fedora
    Replies: 10
    Last Post: 5th July 2008, 07:42 AM
  2. Positive Feedback?
    By Anniedog in forum Fedora Focus
    Replies: 12
    Last Post: 16th June 2008, 03:14 AM
  3. apcupsd and FC4
    By StephenH in forum Hardware
    Replies: 6
    Last Post: 28th July 2005, 05:25 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •