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