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 revision Previous revision
apcupsd [2011/09/02 15:13]
aorth [Daemon]
apcupsd [2011/09/02 15: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.
  
-===== Installation =====+===== 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
  
 +===== Installation (manual) =====
 Download source from: http://​www.apcupsd.com/​ Download source from: http://​www.apcupsd.com/​
  
-<​code>​tar zxf apcupsd-3.14.7.tar.gz +<​code>​tar zxf apcupsd-3.14.7.tar.gz 
-cd apcupsd-3.14.7 +cd apcupsd-3.14.7 
-./configure --enable-usb --enable-cgi +./configure --enable-usb --enable-cgi 
-make</​code>​ +make 
-Because I am afraid of doing ''​make install''​ I will make my own RPM using checkinstall:​ +sudo make install</​code>​
-<​code>​$ sudo /​usr/​sbin/​checkinstall -R +
-$ sudo rpm -i --test -vv ~/​rpmbuild/​RPMS/​x86_64/​apcupsd-3.14.7-1.x86_64.rpm +
-$ sudo rpm -i --force ~/​rpmbuild/​RPMS/​x86_64/​apcupsd-3.14.7-1.x86_64.rpm</​code>​+
  
-Add the daemon to the default runlevels:​ +===== Configuration ​======
-<​code>​$ sudo chkconfig --level 2345 apcupsd on</​code>​ +
- +
-===== Configuration =====+
  
 ==== Daemon ==== ==== Daemon ====
Line 25: 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: 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 47: 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 the following settings (leave ''​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):
Line 54: Line 50:
 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. 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.
Line 63: Line 59:
  
 Check the status by visiting http://​hpc.ilri.cgiar.org/​cgi-bin/​multimon.cgi 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 ===== ===== Troubleshooting =====
apcupsd.txt · Last modified: 2011/09/02 15:42 by aorth