Ubuntu server 12.04/apcupsd

From Attie's Wiki
Jump to: navigation, search

Ubuntu Server 12.04

apt-get install apcupsd

Configure

/etc/apcupsd/apcupsd.conf looks like this:

## apcupsd.conf v1.1 ##
#
#  for apcupsd release 3.14.8 (16 January 2010) - redhat
#
# "apcupsd" POSIX config file
 
#
# ========= General configuration parameters ============
#
UPSNAME PS450
UPSCABLE smart
UPSTYPE smartups
DEVICE /dev/ttyS0
POLLTIME 60
LOCKFILE /var/lock
SCRIPTDIR /etc/apcupsd
PWRFAILDIR /etc/apcupsd
NOLOGINDIR /etc
 
 
#
# ======== Configuration parameters used during power failures ==========
#
ONBATTERYDELAY 6
BATTERYLEVEL 10
MINUTES 10
TIMEOUT 0
ANNOY 300
ANNOYDELAY 60
NOLOGON disable
KILLDELAY 0
 
#
# ==== Configuration statements for Network Information Server ====
#
 
NETSERVER on
NISIP 127.0.0.1
NISPORT 3551
EVENTSFILE /var/log/apcupsd.events
EVENTSFILEMAX 10
 
# 
# ========== Configuration statements used if sharing =============
#            a UPS with more than one machine
 
UPSCLASS standalone
UPSMODE disable
 
#
# ===== Configuration statements to control apcupsd system logging ========
#
 
STATTIME 0
STATFILE /var/log/apcupsd.status
LOGSTATS off
DATATIME 0
#FACILITY DAEMON
 
#
# ========== Configuration statements used in updating the UPS EPROM =========
#
 
# UPS name, max 8 characters
UPSNAME PS450
 
# Battery date - 8 characters
#BATTDATE mm/dd/yy
 
# Sensitivity to line voltage quality (H cause faster transfer to batteries)
# SENSITIVITY H M L        (default = H)
#SENSITIVITY H
 
# UPS delay after power return (seconds)
# WAKEUP 000 060 180 300   (default = 0)
#WAKEUP 60
 
# UPS Grace period after request to power off (seconds)
# SLEEP 020 180 300 600    (default = 20)
#SLEEP 180
 
# Low line voltage causing transfer to batteries
# The permitted values depend on your model as defined by last letter
#  of FIRMWARE or APCMODEL. Some representative values are:
#    D 106 103 100 097
#    M 177 172 168 182
#    A 092 090 088 086
#    I 208 204 200 196     (default = 0 => not valid)
LOTRANSFER  208
 
# High line voltage causing transfer to batteries
# The permitted values depend on your model as defined by last letter
#  of FIRMWARE or APCMODEL. Some representative values are:
#    D 127 130 133 136
#    M 229 234 239 224
#    A 108 110 112 114
#    I 253 257 261 265     (default = 0 => not valid)
HITRANSFER 253
 
# Battery charge needed to restore power
# RETURNCHARGE 00 15 50 90 (default = 15)
#RETURNCHARGE 15
 
# Alarm delay
# 0 = zero delay after pwr fail, T = power fail + 30 sec, L = low battery, N = never
# BEEPSTATE 0 T L N        (default = 0)
BEEPSTATE L
 
# Low battery warning delay in minutes
# LOWBATT 02 05 07 10      (default = 02)
LOWBATT 2
 
# UPS Output voltage when running on batteries
# The permitted values depend on your model as defined by last letter
#  of FIRMWARE or APCMODEL. Some representative values are:
#    D 115
#    M 208
#    A 100
#    I 230 240 220 225     (default = 0 => not valid)
OUTPUTVOLTS 230
 
# Self test interval in hours 336=2 weeks, 168=1 week, ON=at power on
# SELFTEST 336 168 ON OFF  (default = 336)
SELFTEST 336

Then change ISCONFIGURED=yes in /etc/default/apcupsd

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox