User Tools

Site Tools


apcupsd

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
apcupsd [2009/08/20 07:46] 172.26.0.166apcupsd [2011/09/02 12:42] (current) aorth
Line 3: Line 3:
 The HPC's head node is connected to an APC battery backup unit which has a USB cable that can be used for monitoring power status. The [[http://www.apcupsd.org|APC UPS Daemon]] is configured on the server to monitor for power interuptions and notify the computer of the status.  If power is off too long it can instruct the computer to shut down. The HPC's head node is connected to an APC battery backup unit which has a USB cable that can be used for monitoring power status. The [[http://www.apcupsd.org|APC UPS Daemon]] is configured on the server to monitor for power interuptions and notify the computer of the status.  If power is off too long it can instruct the computer to shut down.
  
-We have seen problems with the USB cable not being detected, but switching ports fixed the problem If you see the ''apcupsd'' service failing to start, check the log file to see if something is wrong:+===== Installation (RPM) ===== 
 +Download pre-compiled RPMs for Enterprise Linux 5 from the EPEL project: http://download.fedora.redhat.com/pub/epel/5/x86_64/repoview/apcupsd.html
  
-**/var/log/messages**:+===== Installation (manual) ===== 
 +Download source from: http://www.apcupsd.com/
  
-<file>Aug 17 15:08:36 hpc-ilri apcupsd: apcupsd startup succeeded +<code>tar zxf apcupsd-3.14.7.tar.gz 
-Aug 17 15:08:46 hpc-ilri apcupsd[3224]: apcupsd FATAL ERROR in linux-usb.c at line 649 Cannot find UPS device -- For a link to detailed USB trouble shooting information, please see <http://www.apcupsd.com/support.html> +cd apcupsd-3.14.7 
-Aug 17 15:08:46 hpc-ilri apcupsd[3224]: apcupsd error shutdown completed</file>+./configure --enable-usb --enable-cgi 
 +make 
 +sudo make install</code>
  
-===== Configuration =====+===== Configuration ======
  
 ==== Daemon ==== ==== Daemon ====
Line 17: Line 21:
 After the software is installed, there are two files which need attention: After the software is installed, there are two files which need attention:
  
-=== /etc/apcupsd/hosts.conf === +==== /etc/apcupsd/hosts.conf ==== 
-Make sure to list the the localhost and give it a name.  This is used for remote monitoring and also for checking the status via the multimon CGI script: http://hpc.ilri.cgiar.org/cgi-bin/multimon.cgi+Make sure to list the the localhost and give it a name.  This is used for remote monitoring and also for checking the status via the multimon CGI script:
 <file># Network UPS Tools - hosts.conf <file># Network UPS Tools - hosts.conf
 # #
Line 39: Line 43:
 MONITOR 127.0.0.1 "ILRI-HPC"</file> MONITOR 127.0.0.1 "ILRI-HPC"</file>
  
-=== /etc/apcupsd/apcupsd.conf ===+==== /etc/apcupsd/apcupsd.conf ====
  
-The defaults are ok, but make sure the daemon is configured to use ''UPSTYPE usb'', and leave the ''DEVICE'' blank for auto detection. +The defaults are ok, but make sure the daemon is configured to use the following settings (leave ''DEVICE'' blank for auto detection): 
-<file>UPSTYPE usb+<file>UPSCABLE usb 
 +UPSTYPE usb
 DEVICE</file> DEVICE</file>
  
-==== Web monitoring interface ====+==== Web monitoring interface (optional) ====
  
-The ''apcupsd'' package comes with a web-based frontend to the daemon which monitors battery status and generates graphs.  The files need to be placed in the filesystem where Apache has been configured to allow scripts to run.  This is usually a ''cgi-bin'' folder.  Copy the contents of ''/etc/apcupsd/cgi/'' to ''/var/www/cgi-bin/'' and then you can try to check the status by visiting http://hpc.ilri.cgiar.org/cgi-mon/multimon.cgi+The ''apcupsd'' package comes with a web-based frontend to the daemon which monitors battery status and generates graphs.  The files need to be placed in the filesystem where Apache has been configured to allow scripts to run. 
 + 
 +Copy the CGI scripts: 
 +<code>$ cd /etc/apcupsd 
 +$ sudo cp multimon.cgi upsimage.cgi upsstats.cgi /var/www/cgi-bin/</code> 
 + 
 +Check the status by visiting http://hpc.ilri.cgiar.org/cgi-bin/multimon.cgi 
 + 
 +===== Startup ===== 
 +Add the daemon to the default runlevels: 
 +<code>sudo chkconfig --level 2345 apcupsd on</code> 
 + 
 +===== Testing ===== 
 +Make sure the daemon is stopped, then run: 
 + 
 + 
 +===== Troubleshooting ===== 
 + 
 +We have seen problems with the USB cable not being detected, but switching ports fixed the problem.  If you see the ''apcupsd'' service failing to start, check the log file to see if something is wrong: 
 + 
 +**/var/log/messages**: 
 + 
 +<file>Aug 17 15:08:36 hpc-ilri apcupsd: apcupsd startup succeeded 
 +Aug 17 15:08:46 hpc-ilri apcupsd[3224]: apcupsd FATAL ERROR in linux-usb.c at line 649 Cannot find UPS device -- For a link to detailed USB trouble shooting information, please see <http://www.apcupsd.com/support.html>.  
 +Aug 17 15:08:46 hpc-ilri apcupsd[3224]: apcupsd error shutdown completed</file>
apcupsd.1250754383.txt.gz · Last modified: 2010/05/22 14:19 (external edit)