1## apcupsd.conf v1.1 ## 2# 3# for apcupsd release @VERSION@ - win32-mingw 4# 5# "apcupsd" POSIX config file 6 7# 8# Note that the apcupsd daemon must be restarted in order for changes to 9# this configuration file to become active. 10# 11 12# 13# ========= General configuration parameters ============ 14# 15 16# UPSNAME xxx 17# Use this to give your UPS a name in log files and such. This 18# is particulary useful if you have multiple UPSes. This does not 19# set the EEPROM. It should be 8 characters or less. 20#UPSNAME 21 22# UPSCABLE <cable> 23# Defines the type of cable connecting the UPS to your computer. 24# 25# Possible generic choices for <cable> are: 26# simple, smart, ether, usb 27# 28# Or a specific cable model number may be used: 29# 940-0119A, 940-0127A, 940-0128A, 940-0020B, 30# 940-0020C, 940-0023A, 940-0024B, 940-0024C, 31# 940-1524C, 940-0024G, 940-0095A, 940-0095B, 32# 940-0095C, 940-0625A, M-04-02-2000 33# 34UPSCABLE usb 35 36# To get apcupsd to work, in addition to defining the cable 37# above, you must also define a UPSTYPE, which corresponds to 38# the type of UPS you have (see the Description for more details). 39# You must also specify a DEVICE, sometimes referred to as a port. 40# For USB UPSes, please leave the DEVICE directive blank. For 41# other UPS types, you must specify an appropriate port or address. 42# 43# UPSTYPE DEVICE Description 44# apcsmart COMx Newer serial character device, appropriate for 45# SmartUPS models using a serial cable (not USB). 46# Can be COM1, COM2, etc. 47# 48# usb <BLANK> Most new UPSes are USB. A blank DEVICE 49# setting enables autodetection, which is 50# the best choice for most installations. 51# 52# net hostname:port Network link to a master apcupsd through apcupsd's 53# Network Information Server. This is used if the 54# UPS powering your computer is connected to a 55# different computer for monitoring. 56# 57# snmp hostname:port:vendor:community 58# SNMP network link to an SNMP-enabled UPS device. 59# Hostname is the ip address or hostname of the UPS 60# on the network. Vendor can be can be "APC" or 61# "APC_NOTRAP". "APC_NOTRAP" will disable SNMP trap 62# catching; you usually want "APC". Port is usually 63# 161. Community is usually "private". 64# 65# netsnmp hostname:port:vendor:community 66# OBSOLETE 67# Same as SNMP above but requires use of the 68# net-snmp library. Unless you have a specific need 69# for this old driver, you should use 'snmp' instead. 70# 71# dumb COMx Old serial character device for use with 72# simple-signaling UPSes. Can be COM1, COM2, etc. 73# 74# pcnet ipaddr:username:passphrase 75# PowerChute Network Shutdown protocol which can be 76# used as an alternative to SNMP with the AP9617 77# family of smart slot cards.ipaddr is the IP 78# address of the UPS mgmtcard. username and 79# passphrase are the credentials for which the card 80# has been configured. 81# 82# modbus COMx Serial device for use with newest SmartUPS models 83# supporting the MODBUS protocol. 84# modbus <BLANK> Leave the DEVICE setting blank for MODBUS over USB 85# or set to the serial number of the UPS to ensure 86# that apcupsd binds to that particular unit 87# (helpful if you have more than one USB UPS). 88# 89UPSTYPE usb 90DEVICE 91 92# POLLTIME <int> 93# Interval (in seconds) at which apcupsd polls the UPS for status. This 94# setting applies both to directly-attached UPSes (UPSTYPE apcsmart, usb, 95# dumb) and networked UPSes (UPSTYPE net, snmp). Lowering this setting 96# will improve apcupsd's responsiveness to certain events at the cost of 97# higher CPU utilization. The default of 60 is appropriate for most 98# situations. 99#POLLTIME 60 100 101# SCRIPTDIR <path to script directory> 102# Directory in which apccontrol and event scripts are located. 103SCRIPTDIR @sysconfdir@ 104 105# PWRFAILDIR <path to powerfail directory> 106# Directory in which to write the powerfail flag file. This file 107# is created when apcupsd initiates a system shutdown and is 108# checked in the OS halt scripts to determine if a killpower 109# (turning off UPS output power) is required. 110PWRFAILDIR @PWRFAILDIR@ 111 112# NOLOGINDIR <path to nologin directory> 113# Directory in which to write the nologin file. The existence 114# of this flag file tells the OS to disallow new logins. 115NOLOGINDIR @nologdir@ 116 117 118# 119# ======== Configuration parameters used during power failures ========== 120# 121 122# The ONBATTERYDELAY is the time in seconds from when a power failure 123# is detected until we react to it with an onbattery event. 124# 125# This means that, apccontrol will be called with the powerout argument 126# immediately when a power failure is detected. However, the 127# onbattery argument is passed to apccontrol only after the 128# ONBATTERYDELAY time. If you don't want to be annoyed by short 129# powerfailures, make sure that apccontrol powerout does nothing 130# i.e. comment out the wall. 131ONBATTERYDELAY 6 132 133# 134# Note: BATTERYLEVEL, MINUTES, and TIMEOUT work in conjunction, so 135# the first that occurs will cause the initation of a shutdown. 136# 137 138# If during a power failure, the remaining battery percentage 139# (as reported by the UPS) is below or equal to BATTERYLEVEL, 140# apcupsd will initiate a system shutdown. 141BATTERYLEVEL 5 142 143# If during a power failure, the remaining runtime in minutes 144# (as calculated internally by the UPS) is below or equal to MINUTES, 145# apcupsd, will initiate a system shutdown. 146MINUTES 3 147 148# If during a power failure, the UPS has run on batteries for TIMEOUT 149# many seconds or longer, apcupsd will initiate a system shutdown. 150# A value of 0 disables this timer. 151# 152# Note, if you have a Smart UPS, you will most likely want to disable 153# this timer by setting it to zero. That way, you UPS will continue 154# on batteries until either the % charge remaing drops to or below BATTERYLEVEL, 155# or the remaining battery runtime drops to or below MINUTES. Of course, 156# if you are testing, setting this to 60 causes a quick system shutdown 157# if you pull the power plug. 158# If you have an older dumb UPS, you will want to set this to less than 159# the time you know you can run on batteries. 160TIMEOUT 0 161 162# Time in seconds between annoying users to signoff prior to 163# system shutdown. 0 disables. 164ANNOY 300 165 166# Initial delay after power failure before warning users to get 167# off the system. 168ANNOYDELAY 60 169 170# The condition which determines when users are prevented from 171# logging in during a power failure. 172# NOLOGON <string> [ disable | timeout | percent | minutes | always ] 173NOLOGON disable 174 175# If KILLDELAY is non-zero, apcupsd will continue running after a 176# shutdown has been requested, and after the specified time in 177# seconds attempt to kill the power. This is for use on systems 178# where apcupsd cannot regain control after a shutdown. 179# KILLDELAY <seconds> 0 disables 180KILLDELAY 0 181 182# 183# ==== Configuration statements for Network Information Server ==== 184# 185 186# NETSERVER [ on | off ] on enables, off disables the network 187# information server. If netstatus is on, a network information 188# server process will be started for serving the STATUS and 189# EVENT data over the network (used by CGI programs). 190NETSERVER on 191 192# NISIP <dotted notation ip address> 193# IP address on which NIS server will listen for incoming connections. 194# This is useful if your server is multi-homed (has more than one 195# network interface and IP address). Default value is 0.0.0.0 which 196# means any incoming request will be serviced. Alternatively, you can 197# configure this setting to any specific IP address of your server and 198# NIS will listen for connections only on that interface. Use the 199# loopback address (127.0.0.1) to accept connections only from the 200# local machine. 201NISIP 0.0.0.0 202 203# NISPORT <port> default is 3551 as registered with the IANA 204# port to use for sending STATUS and EVENTS data over the network. 205# It is not used unless NETSERVER is on. If you change this port, 206# you will need to change the corresponding value in the cgi directory 207# and rebuild the cgi programs. 208NISPORT 3551 209 210# If you want the last few EVENTS to be available over the network 211# by the network information server, you must define an EVENTSFILE. 212EVENTSFILE @LOGDIR@\apcupsd.events 213 214# EVENTSFILEMAX <kilobytes> 215# By default, the size of the EVENTSFILE will be not be allowed to exceed 216# 10 kilobytes. When the file grows beyond this limit, older EVENTS will 217# be removed from the beginning of the file (first in first out). The 218# parameter EVENTSFILEMAX can be set to a different kilobyte value, or set 219# to zero to allow the EVENTSFILE to grow without limit. 220EVENTSFILEMAX 10 221 222# 223# ========== Configuration statements used if sharing ============= 224# a UPS with more than one machine 225 226# 227# Remaining items are for ShareUPS (APC expansion card) ONLY 228# 229 230# UPSCLASS [ standalone | shareslave | sharemaster ] 231# Normally standalone unless you share an UPS using an APC ShareUPS 232# card. 233UPSCLASS standalone 234 235# UPSMODE [ disable | share ] 236# Normally disable unless you share an UPS using an APC ShareUPS card. 237UPSMODE disable 238 239# 240# ===== Configuration statements to control apcupsd system logging ======== 241# 242 243# Time interval in seconds between writing the STATUS file; 0 disables 244STATTIME 0 245 246# Location of STATUS file (written to only if STATTIME is non-zero) 247STATFILE @LOGDIR@\apcupsd.status 248 249# LOGSTATS [ on | off ] on enables, off disables 250# Note! This generates a lot of output, so if 251# you turn this on, be sure that the 252# file defined in syslog.conf for LOG_NOTICE is a named pipe. 253# You probably do not want this on. 254LOGSTATS off 255 256# Time interval in seconds between writing the DATA records to 257# the log file. 0 disables. 258DATATIME 0 259 260# FACILITY defines the logging facility (class) for logging to syslog. 261# If not specified, it defaults to "daemon". This is useful 262# if you want to separate the data logged by apcupsd from other 263# programs. 264#FACILITY DAEMON 265 266# 267# ========== Configuration statements used in updating the UPS EPROM ========= 268# 269 270# 271# These statements are used only by apctest when choosing "Set EEPROM with conf 272# file values" from the EEPROM menu. THESE STATEMENTS HAVE NO EFFECT ON APCUPSD. 273# 274 275# UPS name, max 8 characters 276#UPSNAME UPS_IDEN 277 278# Battery date - 8 characters 279#BATTDATE mm/dd/yy 280 281# Sensitivity to line voltage quality (H cause faster transfer to batteries) 282# SENSITIVITY H M L (default = H) 283#SENSITIVITY H 284 285# UPS delay after power return (seconds) 286# WAKEUP 000 060 180 300 (default = 0) 287#WAKEUP 60 288 289# UPS Grace period after request to power off (seconds) 290# SLEEP 020 180 300 600 (default = 20) 291#SLEEP 180 292 293# Low line voltage causing transfer to batteries 294# The permitted values depend on your model as defined by last letter 295# of FIRMWARE or APCMODEL. Some representative values are: 296# D 106 103 100 097 297# M 177 172 168 182 298# A 092 090 088 086 299# I 208 204 200 196 (default = 0 => not valid) 300#LOTRANSFER 208 301 302# High line voltage causing transfer to batteries 303# The permitted values depend on your model as defined by last letter 304# of FIRMWARE or APCMODEL. Some representative values are: 305# D 127 130 133 136 306# M 229 234 239 224 307# A 108 110 112 114 308# I 253 257 261 265 (default = 0 => not valid) 309#HITRANSFER 253 310 311# Battery charge needed to restore power 312# RETURNCHARGE 00 15 50 90 (default = 15) 313#RETURNCHARGE 15 314 315# Alarm delay 316# 0 = zero delay after pwr fail, T = power fail + 30 sec, L = low battery, N = never 317# BEEPSTATE 0 T L N (default = 0) 318#BEEPSTATE T 319 320# Low battery warning delay in minutes 321# LOWBATT 02 05 07 10 (default = 02) 322#LOWBATT 2 323 324# UPS Output voltage when running on batteries 325# The permitted values depend on your model as defined by last letter 326# of FIRMWARE or APCMODEL. Some representative values are: 327# D 115 328# M 208 329# A 100 330# I 230 240 220 225 (default = 0 => not valid) 331#OUTPUTVOLTS 230 332 333# Self test interval in hours 336=2 weeks, 168=1 week, ON=at power on 334# SELFTEST 336 168 ON OFF (default = 336) 335#SELFTEST 336 336