Inhaltsverzeichnis
USV apcupsd - Deamon installieren CentOS 6
Der apcupsd
ist eine Dienst (Deamon), welcher die Überwachung und Steuerung der USV leisten kann. Im Englischen UPS - (Uninterruptible Power Supplie), zu deutsch USV - (Unterbrechungsfreie Strom Versorgung).
Herunterladen
Zum aktuellen Zeitpunkt gibt es keine direkten rpm
-Pakete für CentOS in der Version 6.x. Jedoch kann auf ein externes Repository zurückgegriffen werden, z.B. RPMForge
Wie ein solches Repository eingebunden werden kann, kann unter Zuhilfenahme des nachfolgendem Link innerhalb dieses Dokuwiki's, realisiert werden:
Die aktuelle Version von apcupsd ist
apcupsd-3.14.10-1.el6.rf.rpm
Installation
Ab hier werden root
-Rechte zur Ausführung der nachfolgenden Befehle benötigt. Um root
zu werden geben Sie bitte folgenden Befehl ein:
$ su - Password:
Ein mögliche Installation wäre das RPM-Paket mit folgendem Befehl zu installieren, ausgehend davon das das RPM-Paket sich im Verzeichnis /tmp
befindet:
# yum install apcupsd Loaded plugins: fastestmirror, priorities Loading mirror speeds from cached hostfile 1124 packages excluded due to repository priority protections Setting up Install Process Resolving Dependencies --> Running transaction check ---> Package apcupsd.x86_64 0:3.14.10-1.el6.rf will be installed --> Finished Dependency Resolution Dependencies Resolved ================================================================================ Package Arch Version Repository Size ================================================================================ Installing: apcupsd x86_64 3.14.10-1.el6.rf rpmforge 736 k Transaction Summary ================================================================================ Install 1 Package(s) Total download size: 736 k Installed size: 2.6 M Is this ok [y/N]: y Downloading Packages: apcupsd-3.14.10-1.el6.rf.x86_64.rpm | 736 kB 00:00 Running rpm_check_debug Running Transaction Test Transaction Test Succeeded Running Transaction Installing : apcupsd-3.14.10-1.el6.rf.x86_64 1/1 Installed: apcupsd.x86_64 0:3.14.10-1.el6.rf Complete!
Nach erfolgreicher Installation, kann mit nachfolgendem Befehl überprüft werden, welche Dateien innerhalb des Installationspakets apcupsd
enthalten waren:
# rpm -qil apcupsd Name : apcupsd Relocations: (not relocatable) Version : 3.14.10 Vendor: Dag Apt Repository, http://dag.wieers.com/apt/ Release : 1.el6.rf Build Date: Wed 25 Jan 2012 02:34:49 PM CET Install Date: Sun 12 Feb 2012 05:21:16 AM CET Build Host: lisse.hasselt.wieers.com Group : System Environment/Daemons Source RPM: apcupsd-3.14.10-1.el6.rf.src.rpm Size : 2726362 License: GPL Signature : DSA/SHA1, Wed 25 Jan 2012 03:05:14 PM CET, Key ID a20e52146b8d79e6 Packager : Dag Wieers <dag@wieers.com> URL : http://www.apcupsd.com/ Summary : APC UPS power control daemon Description : Apcupsd can be used for controlling most APC UPSes. During a power failure, apcupsd will inform the users about the power failure and that a shutdown may occur. If power is not restored, a system shutdown will follow when the battery is exausted, a timeout (seconds) expires, or the battery runtime expires based on internal APC calculations determined by power consumption rates. If the power is restored before one of the above shutdown conditions is met, apcupsd will inform users about this fact. Some features depend on what UPS model you have (simple or smart). /etc/apcupsd /etc/apcupsd/apccontrol /etc/apcupsd/apcupsd.conf /etc/apcupsd/apcupsd.css /etc/apcupsd/changeme /etc/apcupsd/commfailure /etc/apcupsd/commok /etc/apcupsd/hid-ups /etc/apcupsd/hosts.conf /etc/apcupsd/make-hiddev /etc/apcupsd/multimon.conf /etc/apcupsd/offbattery /etc/apcupsd/onbattery /etc/httpd/conf.d/apcupsd.conf /etc/logrotate.d/apcupsd /etc/rc.d/init.d/apcupsd /sbin/apcaccess /sbin/apctest /sbin/apcupsd /sbin/smtp /usr/share/doc/apcupsd-3.14.10 /usr/share/doc/apcupsd-3.14.10/COPYING /usr/share/doc/apcupsd-3.14.10/ChangeLog /usr/share/doc/apcupsd-3.14.10/INSTALL /usr/share/doc/apcupsd-3.14.10/Makefile /usr/share/doc/apcupsd-3.14.10/apcaccess.8 /usr/share/doc/apcupsd-3.14.10/apcaccess.man.txt /usr/share/doc/apcupsd-3.14.10/apccontrol.8 /usr/share/doc/apcupsd-3.14.10/apccontrol.man.txt /usr/share/doc/apcupsd-3.14.10/apctest.8 /usr/share/doc/apcupsd-3.14.10/apctest.man.txt /usr/share/doc/apcupsd-3.14.10/apcupsd.8 /usr/share/doc/apcupsd-3.14.10/apcupsd.conf.5 /usr/share/doc/apcupsd-3.14.10/apcupsd.conf.man.txt /usr/share/doc/apcupsd-3.14.10/apcupsd.man.txt /usr/share/doc/apcupsd-3.14.10/examples /usr/share/doc/apcupsd-3.14.10/examples/.deps /usr/share/doc/apcupsd-3.14.10/examples/.deps/hid-ups.P /usr/share/doc/apcupsd-3.14.10/examples/.obj /usr/share/doc/apcupsd-3.14.10/examples/.obj/hid-ups.o /usr/share/doc/apcupsd-3.14.10/examples/Makefile /usr/share/doc/apcupsd-3.14.10/examples/SmartUPS1400.snmp /usr/share/doc/apcupsd-3.14.10/examples/client.c /usr/share/doc/apcupsd-3.14.10/examples/gui /usr/share/doc/apcupsd-3.14.10/examples/gui/about.tcl /usr/share/doc/apcupsd-3.14.10/examples/gui/apcupsd.tcl /usr/share/doc/apcupsd-3.14.10/examples/gui/dialog.tcl /usr/share/doc/apcupsd-3.14.10/examples/gui/events.tcl /usr/share/doc/apcupsd-3.14.10/examples/gui/mainwindow.tcl /usr/share/doc/apcupsd-3.14.10/examples/gui/pkgIndex.tcl /usr/share/doc/apcupsd-3.14.10/examples/gui/splash.tcl /usr/share/doc/apcupsd-3.14.10/examples/gui/status.tcl /usr/share/doc/apcupsd-3.14.10/examples/hid-set.c /usr/share/doc/apcupsd-3.14.10/examples/hid-ups /usr/share/doc/apcupsd-3.14.10/examples/hid-ups.c /usr/share/doc/apcupsd-3.14.10/examples/hiddev-hiddev.h-cleanup-2.4.patch /usr/share/doc/apcupsd-3.14.10/examples/hiddev.h /usr/share/doc/apcupsd-3.14.10/examples/hiddev.txt /usr/share/doc/apcupsd-3.14.10/examples/index.php /usr/share/doc/apcupsd-3.14.10/examples/libusb.h /usr/share/doc/apcupsd-3.14.10/examples/linux-2.4.20-USB-reject.patch /usr/share/doc/apcupsd-3.14.10/examples/linux-2.4.20-killpower.patch /usr/share/doc/apcupsd-3.14.10/examples/linux-2.6.0-USB-queue-overflow.patch /usr/share/doc/apcupsd-3.14.10/examples/linux-usb-patch-email.txt /usr/share/doc/apcupsd-3.14.10/examples/linux-usb-patch2-email.txt /usr/share/doc/apcupsd-3.14.10/examples/make-hiddev /usr/share/doc/apcupsd-3.14.10/examples/megaclient.c /usr/share/doc/apcupsd-3.14.10/examples/nagios_plugin_check_apcupsd.c /usr/share/doc/apcupsd-3.14.10/examples/newslave.c /usr/share/doc/apcupsd-3.14.10/examples/offbattery.cpufreq /usr/share/doc/apcupsd-3.14.10/examples/onbattery.cpufreq /usr/share/doc/apcupsd-3.14.10/examples/php-monitor.txt /usr/share/doc/apcupsd-3.14.10/examples/rpt /usr/share/doc/apcupsd-3.14.10/examples/rpt/Back-UPS-350-USB.rpt /usr/share/doc/apcupsd-3.14.10/examples/rpt/Back-UPS-350ES.rpt /usr/share/doc/apcupsd-3.14.10/examples/rpt/Back-UPS-500-USB.rpt /usr/share/doc/apcupsd-3.14.10/examples/rpt/Back-UPS-500ES.rpt /usr/share/doc/apcupsd-3.14.10/examples/rpt/Back-UPS-BR-800.rpt /usr/share/doc/apcupsd-3.14.10/examples/rpt/Back-UPS-CS-650.rpt /usr/share/doc/apcupsd-3.14.10/examples/rpt/Back-UPS-ES-550.rpt /usr/share/doc/apcupsd-3.14.10/examples/rpt/Back-UPS-XS-1300-LCD.rpt /usr/share/doc/apcupsd-3.14.10/examples/rpt/BackUPS.rpt /usr/share/doc/apcupsd-3.14.10/examples/rpt/Smart-UPS-1500.rpt /usr/share/doc/apcupsd-3.14.10/examples/rpt/SmartUPS-USB.rpt /usr/share/doc/apcupsd-3.14.10/examples/rpt/SmartUPS.rpt /usr/share/doc/apcupsd-3.14.10/examples/rpt/hid-ups.rpt /usr/share/doc/apcupsd-3.14.10/examples/safe.apccontrol /usr/share/doc/apcupsd-3.14.10/examples/safe.apccontrol.in /usr/share/doc/apcupsd-3.14.10/examples/smartsim.c /usr/share/doc/apcupsd-3.14.10/examples/snoopdecode.c /usr/share/doc/apcupsd-3.14.10/examples/status /usr/share/doc/apcupsd-3.14.10/examples/status/Back-UPS-BX-1500.status /usr/share/doc/apcupsd-3.14.10/examples/status/Back-UPS-Pro-1000.status /usr/share/doc/apcupsd-3.14.10/examples/status/BackUPS-USB.status /usr/share/doc/apcupsd-3.14.10/examples/status/JapaneseUPS.status /usr/share/doc/apcupsd-3.14.10/examples/status/PowerStack450.status /usr/share/doc/apcupsd-3.14.10/examples/status/SmartUPS-vs-650.status /usr/share/doc/apcupsd-3.14.10/examples/status/SmartUPS1000.status /usr/share/doc/apcupsd-3.14.10/examples/status/SmartUPS1400.status /usr/share/doc/apcupsd-3.14.10/examples/status/SmartUPS3000.status /usr/share/doc/apcupsd-3.14.10/examples/status/SmartUPS5000.status /usr/share/doc/apcupsd-3.14.10/examples/status/SmartUPS600.status /usr/share/doc/apcupsd-3.14.10/examples/status/SmartUPS700-2.status /usr/share/doc/apcupsd-3.14.10/examples/status/SmartUPS700.status /usr/share/doc/apcupsd-3.14.10/examples/status/newbackupspro1.status /usr/share/doc/apcupsd-3.14.10/examples/status/newbackupspro2.status /usr/share/doc/apcupsd-3.14.10/examples/upsapm.c /usr/share/doc/apcupsd-3.14.10/examples/usb_hid_usages /usr/share/doc/apcupsd-3.14.10/examples/usbsnoop.txt /usr/share/doc/apcupsd-3.14.10/home-page /usr/share/doc/apcupsd-3.14.10/home-page/apcupsd.gif /usr/share/doc/apcupsd-3.14.10/home-page/bclogo.gif /usr/share/doc/apcupsd-3.14.10/home-page/bugs.html /usr/share/doc/apcupsd-3.14.10/home-page/bugs.wml /usr/share/doc/apcupsd-3.14.10/home-page/dl.php /usr/share/doc/apcupsd-3.14.10/home-page/index.html /usr/share/doc/apcupsd-3.14.10/home-page/index.wml /usr/share/doc/apcupsd-3.14.10/home-page/license.html /usr/share/doc/apcupsd-3.14.10/home-page/license.wml /usr/share/doc/apcupsd-3.14.10/home-page/lists.html /usr/share/doc/apcupsd-3.14.10/home-page/lists.wml /usr/share/doc/apcupsd-3.14.10/home-page/mail16d.png /usr/share/doc/apcupsd-3.14.10/home-page/menu.inc /usr/share/doc/apcupsd-3.14.10/home-page/phpinfo.php /usr/share/doc/apcupsd-3.14.10/home-page/publishsite /usr/share/doc/apcupsd-3.14.10/home-page/support.html /usr/share/doc/apcupsd-3.14.10/home-page/support.wml /usr/share/doc/apcupsd-3.14.10/home-page/systems.html /usr/share/doc/apcupsd-3.14.10/home-page/systems.wml /usr/share/doc/apcupsd-3.14.10/home-page/template.inc /usr/share/doc/apcupsd-3.14.10/images /usr/share/doc/apcupsd-3.14.10/images/apcupsd-logo.png /usr/share/doc/apcupsd-3.14.10/images/apcupsd.png /usr/share/doc/apcupsd-3.14.10/images/charging.png /usr/share/doc/apcupsd-3.14.10/images/commlost.png /usr/share/doc/apcupsd-3.14.10/images/main_configs.png /usr/share/doc/apcupsd-3.14.10/images/multimon.png /usr/share/doc/apcupsd-3.14.10/images/onbatt.png /usr/share/doc/apcupsd-3.14.10/images/online.png /usr/share/doc/apcupsd-3.14.10/images/status.png /usr/share/doc/apcupsd-3.14.10/images/thanks.png /usr/share/doc/apcupsd-3.14.10/images/wininstall6.png /usr/share/doc/apcupsd-3.14.10/manual /usr/share/doc/apcupsd-3.14.10/manual/Makefile /usr/share/doc/apcupsd-3.14.10/manual/apcupsd.png /usr/share/doc/apcupsd-3.14.10/manual/cables.rst /usr/share/doc/apcupsd-3.14.10/manual/charging.png /usr/share/doc/apcupsd-3.14.10/manual/commlost.png /usr/share/doc/apcupsd-3.14.10/manual/main_configs.png /usr/share/doc/apcupsd-3.14.10/manual/maintaining_ups.rst /usr/share/doc/apcupsd-3.14.10/manual/manual.html /usr/share/doc/apcupsd-3.14.10/manual/manual.rst /usr/share/doc/apcupsd-3.14.10/manual/multimon.png /usr/share/doc/apcupsd-3.14.10/manual/onbatt.png /usr/share/doc/apcupsd-3.14.10/manual/online.png /usr/share/doc/apcupsd-3.14.10/manual/publishdoc /usr/share/doc/apcupsd-3.14.10/manual/smartprotocol.rst /usr/share/doc/apcupsd-3.14.10/manual/status.png /usr/share/doc/apcupsd-3.14.10/manual/thanks.png /usr/share/doc/apcupsd-3.14.10/manual/wininstall6.png /usr/share/doc/apcupsd-3.14.10/techlogs /usr/share/doc/apcupsd-3.14.10/techlogs/1999 /usr/share/doc/apcupsd-3.14.10/techlogs/1999/cpe16Dec99 /usr/share/doc/apcupsd-3.14.10/techlogs/1999/kes03Nov99 /usr/share/doc/apcupsd-3.14.10/techlogs/1999/kes05Nov99 /usr/share/doc/apcupsd-3.14.10/techlogs/1999/kes08Dec99 /usr/share/doc/apcupsd-3.14.10/techlogs/1999/kes09Dec99 /usr/share/doc/apcupsd-3.14.10/techlogs/1999/kes13Nov99 /usr/share/doc/apcupsd-3.14.10/techlogs/1999/kes13Nov99-2 /usr/share/doc/apcupsd-3.14.10/techlogs/1999/kes15Nov99 /usr/share/doc/apcupsd-3.14.10/techlogs/1999/kes18Dec99 /usr/share/doc/apcupsd-3.14.10/techlogs/1999/kes18Nov99 /usr/share/doc/apcupsd-3.14.10/techlogs/1999/kes19Dec99 /usr/share/doc/apcupsd-3.14.10/techlogs/1999/kes20Nov99 /usr/share/doc/apcupsd-3.14.10/techlogs/1999/kes26Sep99 /usr/share/doc/apcupsd-3.14.10/techlogs/1999/kes28Nov99 /usr/share/doc/apcupsd-3.14.10/techlogs/1999/kes30Dec99 /usr/share/doc/apcupsd-3.14.10/techlogs/1999/kes30Nov99 /usr/share/doc/apcupsd-3.14.10/techlogs/1999/ric06Nov99 /usr/share/doc/apcupsd-3.14.10/techlogs/1999/ric30Sep99 /usr/share/doc/apcupsd-3.14.10/techlogs/2000 /usr/share/doc/apcupsd-3.14.10/techlogs/2000/kes02Aug00 /usr/share/doc/apcupsd-3.14.10/techlogs/2000/kes05Dec00 /usr/share/doc/apcupsd-3.14.10/techlogs/2000/kes05Oct00 /usr/share/doc/apcupsd-3.14.10/techlogs/2000/kes06Jan00 /usr/share/doc/apcupsd-3.14.10/techlogs/2000/kes06Oct00 /usr/share/doc/apcupsd-3.14.10/techlogs/2000/kes08Dec00 /usr/share/doc/apcupsd-3.14.10/techlogs/2000/kes09Jan00 /usr/share/doc/apcupsd-3.14.10/techlogs/2000/kes10Sep00 /usr/share/doc/apcupsd-3.14.10/techlogs/2000/kes11May00 /usr/share/doc/apcupsd-3.14.10/techlogs/2000/kes12Feb00 /usr/share/doc/apcupsd-3.14.10/techlogs/2000/kes12Jan00 /usr/share/doc/apcupsd-3.14.10/techlogs/2000/kes13Jan00 /usr/share/doc/apcupsd-3.14.10/techlogs/2000/kes16Jan00 /usr/share/doc/apcupsd-3.14.10/techlogs/2000/kes17Jan00 /usr/share/doc/apcupsd-3.14.10/techlogs/2000/kes17Oct00 /usr/share/doc/apcupsd-3.14.10/techlogs/2000/kes21Oct00 /usr/share/doc/apcupsd-3.14.10/techlogs/2000/kes26Jan00 /usr/share/doc/apcupsd-3.14.10/techlogs/2000/kes27Oct00 /usr/share/doc/apcupsd-3.14.10/techlogs/2000/kes27Sep00 /usr/share/doc/apcupsd-3.14.10/techlogs/2001 /usr/share/doc/apcupsd-3.14.10/techlogs/2001/kes03Aug01 /usr/share/doc/apcupsd-3.14.10/techlogs/2001/kes05Sep01 /usr/share/doc/apcupsd-3.14.10/techlogs/2001/kes11Aug01 /usr/share/doc/apcupsd-3.14.10/techlogs/2001/kes12Nov01 /usr/share/doc/apcupsd-3.14.10/techlogs/2001/kes16Sep01 /usr/share/doc/apcupsd-3.14.10/techlogs/2001/kes18Dec01 /usr/share/doc/apcupsd-3.14.10/techlogs/2001/kes19Oct01 /usr/share/doc/apcupsd-3.14.10/techlogs/2001/kes22Nov01 /usr/share/doc/apcupsd-3.14.10/techlogs/2001/kes26Sep01 /usr/share/doc/apcupsd-3.14.10/techlogs/2001/kes28Oct01 /usr/share/doc/apcupsd-3.14.10/techlogs/2001/ric07Aug01 /usr/share/doc/apcupsd-3.14.10/techlogs/2001/ric15Sep01 /usr/share/doc/apcupsd-3.14.10/techlogs/2001/ric23Sep01 /usr/share/doc/apcupsd-3.14.10/techlogs/2002 /usr/share/doc/apcupsd-3.14.10/techlogs/2002/dr20Jan02 /usr/share/doc/apcupsd-3.14.10/techlogs/2002/jp09Jan02 /usr/share/doc/apcupsd-3.14.10/techlogs/2002/kam03Jan02 /usr/share/doc/apcupsd-3.14.10/techlogs/2002/kam05Jan02 /usr/share/doc/apcupsd-3.14.10/techlogs/2002/kes02Jun02 /usr/share/doc/apcupsd-3.14.10/techlogs/2002/kes08Nov02 /usr/share/doc/apcupsd-3.14.10/techlogs/2002/kes09Jan02 /usr/share/doc/apcupsd-3.14.10/techlogs/2002/kes11Dec02 /usr/share/doc/apcupsd-3.14.10/techlogs/2002/kes15Jul02 /usr/share/doc/apcupsd-3.14.10/techlogs/2002/kes16May02 /usr/share/doc/apcupsd-3.14.10/techlogs/2002/kes22Jan02 /usr/share/doc/apcupsd-3.14.10/techlogs/2002/kes27Jan02 /usr/share/doc/apcupsd-3.14.10/techlogs/2002/ric05Jan02 /usr/share/doc/apcupsd-3.14.10/techlogs/2002/ric13Jan02 /usr/share/doc/apcupsd-3.14.10/techlogs/2003 /usr/share/doc/apcupsd-3.14.10/techlogs/2003/RN-3.10.6 /usr/share/doc/apcupsd-3.14.10/techlogs/2003/Release_Notes-3.10.9.txt /usr/share/doc/apcupsd-3.14.10/techlogs/2003/kes-3.10.4 /usr/share/doc/apcupsd-3.14.10/techlogs/2003/kes-3.10.5 /usr/share/doc/apcupsd-3.14.10/techlogs/2003/kes-3.10.6 /usr/share/doc/apcupsd-3.14.10/techlogs/2003/kes-3.10.7 /usr/share/doc/apcupsd-3.14.10/techlogs/2003/kes-3.10.8 /usr/share/doc/apcupsd-3.14.10/techlogs/2003/kes-3.10.9 /usr/share/doc/apcupsd-3.14.10/techlogs/2004 /usr/share/doc/apcupsd-3.14.10/techlogs/2004/RN-3.10.13 /usr/share/doc/apcupsd-3.14.10/techlogs/2004/RN-3.10.14 /usr/share/doc/apcupsd-3.14.10/techlogs/2004/Release_Notes-3.10.10.txt /usr/share/doc/apcupsd-3.14.10/techlogs/2004/kes-3.10.10 /usr/share/doc/apcupsd-3.14.10/techlogs/2004/kes-3.10.11 /usr/share/doc/apcupsd-3.14.10/techlogs/2004/kes-3.10.12 /usr/share/doc/apcupsd-3.14.10/techlogs/2004/kes-3.10.13 /usr/share/doc/apcupsd-3.14.10/techlogs/2004/kes-3.10.14 /usr/share/doc/apcupsd-3.14.10/techlogs/2004/kes-3.10.15 /usr/share/doc/apcupsd-3.14.10/techlogs/2004/kes-3.10.16 /usr/share/doc/apcupsd-3.14.10/techlogs/2005 /usr/share/doc/apcupsd-3.14.10/techlogs/2005/kes-3.10.17 /usr/share/doc/apcupsd-3.14.10/techlogs/3.8.2 /usr/share/doc/apcupsd-3.14.10/techlogs/3.8.2/gdr01Mar01 /usr/share/doc/apcupsd-3.14.10/techlogs/3.8.2/kes03Jul01 /usr/share/doc/apcupsd-3.14.10/techlogs/3.8.2/kes05Mar01 /usr/share/doc/apcupsd-3.14.10/techlogs/3.8.2/kes06Apr01 /usr/share/doc/apcupsd-3.14.10/techlogs/3.8.2/kes09Apr01 /usr/share/doc/apcupsd-3.14.10/techlogs/3.8.2/kes10Apr01 /usr/share/doc/apcupsd-3.14.10/techlogs/3.8.2/kes20Jun01 /usr/share/doc/apcupsd-3.14.10/techlogs/3.8.2/kes21Jun01 /usr/share/doc/apcupsd-3.14.10/techlogs/3.8.2/kes27Feb01 /usr/share/doc/apcupsd-3.14.10/techlogs/3.8.2/kes27Jun01 /usr/share/doc/apcupsd-3.14.10/techlogs/3.8.2/kes28Apr01 /usr/share/doc/apcupsd-3.14.10/techlogs/3.8.4 /usr/share/doc/apcupsd-3.14.10/techlogs/3.8.4/go13Aug01 /usr/share/doc/apcupsd-3.14.10/techlogs/3.8.4/kes05Sep01 /usr/share/doc/apcupsd-3.14.10/techlogs/3.8.4/kes07Dec01 /usr/share/doc/apcupsd-3.14.10/techlogs/3.8.4/kes10Jul01 /usr/share/doc/apcupsd-3.14.10/techlogs/3.8.4/kes10Sep01 /usr/share/doc/apcupsd-3.14.10/techlogs/3.8.4/kes20Nov01 /usr/share/doc/apcupsd-3.14.10/techlogs/3.8.4/kes24Nov01 /usr/share/doc/apcupsd-3.14.10/techlogs/3.8.4/kes26Nov01 /usr/share/doc/apcupsd-3.14.10/techlogs/3.8.4/kes29Jul01 /usr/share/doc/apcupsd-3.14.10/techlogs/3.8.5 /usr/share/doc/apcupsd-3.14.10/techlogs/3.8.5/go13Aug01 /usr/share/doc/apcupsd-3.14.10/techlogs/3.8.5/kes03Jan02 /usr/share/doc/apcupsd-3.14.10/techlogs/3.8.5/kes04Jan02 /usr/share/doc/apcupsd-3.14.10/techlogs/3.8.5/mb07Jan02 /usr/share/doc/apcupsd-3.14.10/techlogs/3.8.5/ric30Oct01 /usr/share/doc/apcupsd-3.14.10/techlogs/adk-3.11 /usr/share/doc/apcupsd-3.14.10/techlogs/adk-3.13 /usr/share/doc/apcupsd-3.14.10/techlogs/kes-3.11 /usr/share/hal/fdi/policy/20thirdparty/80-apcupsd-ups-policy.fdi /usr/share/man/man5/apcupsd.conf.5.gz /usr/share/man/man8/apcaccess.8.gz /usr/share/man/man8/apccontrol.8.gz /usr/share/man/man8/apctest.8.gz /usr/share/man/man8/apcupsd.8.gz /var/www/apcupsd /var/www/apcupsd/multimon.cgi /var/www/apcupsd/upsfstats.cgi /var/www/apcupsd/upsimage.cgi /var/www/apcupsd/upsstats.cgi
Konfiguration
Nach der erfolgreichen Installation des apcupsd
ist es an der Zeit die Konfigurationsdatei
/etc/apcupsd/apcupsd.conf
entsprechend anzupassen.
Dies Konfigurationsdatei /etc/apcupsd/apcupsd.conf
nach der Installation im default-Zustand sieht wie folgt aus (Kommentarzeilen und Leerzeilen werden nicht mit ausgegeben):
# egrep -v '(^.*#|^$)' /etc/apcupsd/apcupsd.conf UPSCABLE smart UPSTYPE apcsmart DEVICE /dev/ttyS0 LOCKFILE /var/lock SCRIPTDIR /etc/apcupsd PWRFAILDIR /etc/apcupsd NOLOGINDIR /etc ONBATTERYDELAY 6 BATTERYLEVEL 5 MINUTES 3 TIMEOUT 0 ANNOY 300 ANNOYDELAY 60 NOLOGON disable KILLDELAY 0 NETSERVER on NISIP 0.0.0.0 NISPORT 3551 EVENTSFILE /var/log/apcupsd.events EVENTSFILEMAX 10 UPSCLASS standalone UPSMODE disable STATTIME 0 STATFILE /var/log/apcupsd.status LOGSTATS off DATATIME 0
Folgende drei Angaben in der Konfigurationsdatei /etc/apcupsd/apcupsd.conf
sind minimal zu setzen, um den Deamon starten zu können:
UPSCABLE usb
- Definiert die Art des Kabels, wie der Server mit der USV verbunden ist.UPSTYPE usb
- Definiert die Art, wie der Server mit der USV kommuniziert, was jedoch abhängig vom Kabel ist !!!DEVICE
- Beim UPSTYPE usb muss diese Angabe LEER bleiben !!!
Nachfolgende Angaben bestimmen das Verhalten des Deamon an sich und sind ebenfalls standardmäßig in der Konfigurationsdatei /etc/apcupsd/apcupsd.conf
vorhanden:
LOCKFILE /var/lock
- Pfad zur Sperr-Datei (zeigt an, ob der Deamon gestartet wurde)SCRIPTDIR /etc/apcupsd
- Pfad zum Verzeichnis in dem benötigte Scripte enthalten sindPWRFAILDIR /etc/apcupsd
- Pfad zum Verzeichnis in dem der Hinweis gespeichert wird, dass eine Abschaltung wegen Stromausfall durchgeführt wurdeNOLOGINDIR /etc
- Pfad zum Verzeichnis in dem der Hinweis gespeichert wird, dass keine Neuanmeldungen bis zum Herunterfahren erfolgen dürfen
Dies ist eine Beispiel, wie eine Konfigurationsdatei /etc/apcupsd/apcupsd.conf
aussehen könnte:
# egrep -v '(^.*#|^$)' /etc/apcupsd/apcupsd.conf UPSNAME USV UPSCABLE usb UPSTYPE usb DEVICE LOCKFILE /var/lock SCRIPTDIR /etc/apcupsd PWRFAILDIR /etc/apcupsd NOLOGINDIR /etc ONBATTERYDELAY 6 BATTERYLEVEL 5 MINUTES 5 TIMEOUT 180 ANNOY 60 ANNOYDELAY 10 NOLOGON disable KILLDELAY 0 NETSERVER on NISIP 0.0.0.0 NISPORT 3551 EVENTSFILE /var/log/apcupsd.events EVENTSFILEMAX 10 UPSCLASS standalone UPSMODE disable STATTIME 0 STATFILE /var/log/apcupsd.status LOGSTATS off DATATIME 0
Für weitere Erklärungen zu den einzelnen Optionen in der Konfiguratiosndatei /etc/apcupsd/apcupsd.conf
kann folgender Link hilfreich sein:
Deamon starten
Um den Apcupsd zu starten kann folgender Befehl angewandt werden:
# service apcupsd start Starting UPS monitoring: [ OK ]
Um den Apcupsd zu stoppen kann folgender Befehl angewandt werden:
# service apcupsd stop Shutting down UPS monitoring: [ OK ]
Eine Überprüfung ob der Start des Apcupsd erfolgreich war kann mit folgendem Befehl durchgeführt werden, welcher nachfolgende Ausgabe erzeugen sollte:
# service apcupsd status apcupsd (pid 1492) is running... APC : 001,036,0923 DATE : 2012-02-12 05:37:00 +0100 HOSTNAME : rechner90.dmz.tachtler.net VERSION : 3.14.10 (13 September 2011) redhat UPSNAME : USV CABLE : USB Cable DRIVER : USB UPS Driver UPSMODE : Stand Alone STARTTIME: 2012-02-12 05:36:58 +0100 MODEL : Back-UPS RS 550GI STATUS : ONLINE LINEV : 232.0 Volts LOADPCT : 23.0 Percent Load Capacity BCHARGE : 100.0 Percent TIMELEFT : 20.2 Minutes MBATTCHG : 5 Percent MINTIMEL : 5 Minutes MAXTIME : 600 Seconds SENSE : High LOTRANS : 176.0 Volts HITRANS : 282.0 Volts ALARMDEL : 30 seconds BATTV : 13.6 Volts LASTXFER : Automatic or explicit self test NUMXFERS : 0 TONBATT : 0 seconds CUMONBATT: 0 seconds XOFFBATT : N/A SELFTEST : NO STATFLAG : 0x07000008 Status Flag SERIALNO : 3B0947X11105 BATTDATE : 2009-11-17 NOMINV : 100 Volts NOMBATTV : 12.0 Volts NOMPOWER : 330 Watts FIRMWARE : 857.L1 .I USB FW:L1 END APC : 2012-02-12 05:37:15 +0100
Um den apcupsd
-Daemon dauerhaft bei jedem Neustart des Rechners automatisch zu starten geben Sie bitte als root
folgenden Befehl ein, um zu überprüfen wie die aktuelle Konfiguration des Startverhaltens des aktuellen apcupsd
-Daemon aussieht:
# chkconfig --list | grep apcupsd apcupsd 0:off 1:off 2:on 3:on 4:on 5:on 6:off
Falls die Ausgabe wie oben gezeigt erscheinen sollte, wird der apcupsd
-Daemon bei jedem Neustart des Rechners gestartet. Falls dies nicht so sein sollte, kann dies mit folgende Befehle nachgeholt werden:
# chkconfig apcupsd on
* Aktivieren des automatischen Starten des apcupsd
-Daemon.
Webanwendungen
Falls der Deamons - Apcupsd erfolgreich installiert, konfiguriert und gestartet ist, kann mit nachfolgenden Anweisungen eine Überwachung der USV via Netzwerk bzw. Internet und Webbrowser ermöglicht werden.
Zu beachten ist, das die Scripte in einem CGI-Verzeichnis oder einem Verzeichnis auf dem Apache HTTP Webserver zu erreichen sein müssen. Evtl. kann auch ein eigener Virtueller Host im Apache HTTP Webserver dafür definiert werden.
Standardmäßig werden die benötigten CGI-Scripte im Verzeichnis /var/www/apcupsd
installiert. Falls dies gewünscht sein sollte, können die Scripte mit nachfolgender Beispiel-URL erreicht werden:
HINWEIS - Wesentlich eleganter ist die Definition eines Virtuellen Host in der Konfigurationsdatei /etc/httpd/conf.d/vhosts.conf
, die könnte wie folgt aussehen könnte:
# # usv.tachtler.net # (only reachable from local network) # <VirtualHost *:80> ServerAdmin webmaster@tachtler.net ServerName usv.tachtler.net ServerAlias www.usv.tachtler.net ServerPath / DocumentRoot "/var/www/apcupsd" AddHandler cgi-script .cgi <Directory "/var/www/apcupsd"> Options ExecCGI AllowOverride AuthConfig Order deny,allow Deny from all # Access from local host only Allow from 127.0.0.1 # Access from local network Allow from 192.168.0.0/24 </Directory> DirectoryIndex multimon.cgi ErrorLog logs/usv_error.log CustomLog logs/usv_access.log combined </VirtualHost>
WICHTIG sind hier folgende Definitionen:
AddHandler cgi-script .cgi
* Ausführbarkeit von CGI-Scripte für den Apache HTTP Webserver und
DirectoryIndex multimon.cgi
* Startdatei für den Apache HTTP Webserver, damit das CGI-Script beim Aufruf des Virtuellen Hosts gleich ausgeführt wird.
Konfiguration
Zwar ist die „Webanwendung“ bereits lauffähig, jedoch können noch Anpassungen in der Konfigurationsdatei von apcupsd-multimon
durchgeführt werden, welche in nachfolgendem Verzeichnis und mit nachfolgendem Namen zu editieren sind:
/etc/apcupsd/multimon.conf
/etc/apcupsd/hosts.conf
/etc/apcupsd/multimon.conf
Dies Konfigurationsdatei /etc/apcupsd/multimon.conf
nach der Installation im default-Zustand sieht wie folgt aus (Kommentarzeilen und Leerzeilen werden nicht mit ausgegeben):
# egrep -v '(^.*#|^$)' /etc/apcupsd/multimon.conf TEMPC FIELD SYSTEM "System" "" FIELD MODEL "Model" "" FIELD STATUS "Status" "" FIELD battpct "Battery Chg" "%" FIELD utility "Utility" "VAC" FIELD loadpct "UPS Load" "%" FIELD UPSTEMP "UPS Temp" "" FIELD runtime "Batt. Run Time" "min." FIELD DATA "Data" "All data"
HINWEIS - Da nicht von allen USV's die Ausgabe der Batterie-Temperatur unterstützt wird, kann diese mit dem auskommentieren der nachfolgenden Zeile auch ausgeblendet werden (nur relevanter Ausschnitt):
... # FIELD UPSTEMP "UPS Temp" "" ...
HINWEIS - Das Hinzufügen von Feldern ist ebenfalls möglich! Nachfolgende Zeile zeigt an, wie die USV an den Server angeschlossen ist nur relevanter Ausschnitt):
... FIELD cable "Anschlussart" "" ...
Weitere Anpassungen wären z.B. die Übersetzung der angezeigten Spalten in die deutsche Sprache, eine Konfigurationsdatei /etc/apcupsd/multimon.conf
könnte dann wie folgt aussehen (Kommentarzeilen und Leerzeilen werden nicht mit ausgegeben):
# egrep -v '(^.*#|^$)' /etc/apcupsd/multimon.conf TEMPC FIELD SYSTEM "System" "" FIELD MODEL "Modell" "" FIELD cable "Anschlussart" "" FIELD STATUS "Status" "" FIELD battpct "Batterie Ladezustand" "%" FIELD loadpct "USV Auslastung" "%" FIELD runtime "Batterie Restlaufzeit" "min." FIELD utility "Eingangsspannung" "Volt" FIELD DATA "Details" "Abfrage"
/etc/apcupsd/hosts.conf
Dies Konfigurationsdatei /etc/apcupsd/multimon.conf
nach der Installation im default-Zustand sieht wie folgt aus:
# cat hosts.conf # Network UPS Tools - hosts.conf # # This file does double duty - it lists the systems that multimon will # monitor, and also specifies the systems that upsstats is allowed to # watch. It keeps people from feeding random addresses to upsstats, # among other things. upsimage also uses this file to know who it # may speak to. upsfstats too. # # Usage: list systems running upsd that you want to monitor # # MONITOR <address> "<host description>" # # Please note, MONITOR must start in column 1 (no spaces permitted) # # Example: # MONITOR 10.64.1.1 "Finance department" # MONITOR 10.78.1.1 "Sierra High School data room #1" # MONITOR 127.0.0.1 "Local Host"
Hier kann die letzte Zeile, wie folgt abgeändert werden (nur relevanter Ausschnitt):
...
MONITOR 127.0.0.1 "usv.tachtler.net"
...
Anzeigebeispiele
Folgende Anzeigen sind Beispiele für die verschiedenen CGI-Scripte, welche durch Apcupsd bereitgestellt werden