czwartek, 15 listopada 2012

Using NUT to monitor APC APC Back-Ups CS 500 uninterruptible power supply

The following installation instructions assume that you have just install NUT from Your distribution. If installation finished without any problems we just need to edit config files. 1.Configure the driver. As root we edit the following file: /etc/ups/ups.conf:
------------

[apc]
driver = usbhid-ups
port = auto
desc = "back-ups cs 500"
------------

2. Configure monitored UPS. As root we edit the following file:

/etc/ups/upsmon.conf
------------
MONITOR apc@localhost 1 upsmaster changeme master
MINSUPPLIES 1
SHUTDOWNCMD "/sbin/shutdown -h +0"
POLLFREQ 5
POLLFREQALERT 5
HOSTSYNC 15
DEADTIME 15
POWERDOWNFLAG /etc/killpower
NOTIFYFLAG ONLINE SYSLOG
NOTIFYFLAG COMMOK SYSLOG
NOTIFYFLAG SHUTDOWN SYSLOG
NOTIFYFLAG ONBATT SYSLOG+WALL
NOTIFYFLAG LOWBATT SYSLOG+WALL
NOTIFYFLAG FSD SYSLOG+WALL
NOTIFYFLAG NOCOMM SYSLOG+WALL
NOTIFYFLAG COMMBAD SYSLOG+WALL
RBWARNTIME 43200
NOCOMMWARNTIME 300
FINALDELAY 5
------------

3. Configure monitoring user. As root we edit the following file:

/usr/etc/upsd.users
------------
[upsmaster]
password = changeme
allowfrom = localhost
upsmon master
------------
4. Restart NUT service. Execute as root following command:
/etc/init.d/upsd restart
5. Test whether this worked, see if you can get a listing of the UPS state variables:
upsc apc@localhost
battery.charge: 100
battery.charge.low: 10
battery.charge.warning: 50
battery.mfr.date: 2001/12/21
battery.runtime: 1080
battery.type: PbAc
battery.voltage: 13.4
battery.voltage.nominal: 12.0
device.mfr: American Power Conversion
device.model: Back-UPS 500
device.serial: BB0151020943
device.type: ups
driver.name: usbhid-ups
driver.parameter.pollfreq: 30
driver.parameter.pollinterval: 2
driver.parameter.port: auto
driver.version: 2.6.3
driver.version.data: APC HID 0.95
driver.version.internal: 0.35
ups.firmware: 6.3.I
ups.firmware.aux: c1
ups.mfr: American Power Conversion
ups.mfr.date: 2001/12/21
ups.model: Back-UPS 500
ups.productid: 0002
ups.serial: BB0151020943
ups.status: OL
ups.timer.reboot: 0
ups.vendorid: 051d
6. In finall step we change runlevel for upsd service to start upsd service.
In opensuse distribution we can use runlevel editor :
yast->system->runlevel editor

Brak komentarzy: