apcupsd.conf 12 KB

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