apcupsd.conf 12 KB

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