Advertisement
Guest User

/etc/apcupsd/apcupsd.conf

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