1UPS.CONF(5) NUT Manual UPS.CONF(5)
2
3
4
6 ups.conf - UPS definitions for Network UPS Tools
7
9 This file is read by the driver controller upsdrvctl(8), the UPS
10 drivers that use the common core (see nutupsdrv(8), and upsd(8)). The
11 file begins with global directives, and then each UPS has a section
12 which contains a number of directives that set parameters for that UPS.
13
14 A UPS section begins with the name of the UPS in brackets, and
15 continues until the next UPS name in brackets or until EOF. The name
16 "default" is used internally in upsd, so you can’t use it in this file.
17
18 You must define the driver and port elements for each entry. Anything
19 after that in a section is optional. A simple example might look like
20 this:
21
22 [myups]
23 driver = blazer_ser
24 port = /dev/ttyS0
25 desc = "Web server UPS"
26
27 A slightly more complicated version includes some extras for the
28 hardware-specific part of the driver:
29
30 [bigups]
31 driver = apcsmart
32 port = /dev/cua00
33 cable = 940-0095B
34 sdtype = 2
35 desc = "Database server UPS"
36
37 In this case, the apcsmart(8) driver will receive variables called
38 "cable" and "sdtype" which have special meanings. See the man pages of
39 your driver(s) to learn which variables are supported and what they do.
40
42 chroot
43 Optional. The driver will chroot(2) to this directory during
44 initialization. This can be useful when securing systems.
45
46 driverpath
47 Optional. Path name of the directory in which the UPS driver
48 executables reside. If you don’t specify this, the programs look in
49 a built-in default directory, which is often /usr/local/ups/bin.
50
51 maxstartdelay
52 Optional. Same as the UPS field of the same name, but this is the
53 default for UPSes that don’t have the field.
54
55 maxretry
56 Optional. Specify the number of attempts to start the driver(s), in
57 case of failure, before giving up. A delay of retrydelay is
58 inserted between each attempt. Caution should be taken when using
59 this option, since it can impact the time taken by your system to
60 start.
61
62 The default is 1 attempt.
63
64 retrydelay
65 Optional. Specify the delay between each restart attempt of the
66 driver(s), as specified by maxretry. Caution should be taken when
67 using this option, since it can impact the time taken by your
68 system to start.
69
70 The default is 5 seconds.
71
72 pollinterval
73 Optional. The status of the UPS will be refreshed after a maximum
74 delay which is controlled by this setting. This is normally 2
75 seconds. This may be useful if the driver is creating too much of a
76 load on your system or network.
77
78 synchronous
79 Optional. The driver work by default in asynchronous mode (i.e
80 synchronous=no). This means that all data are pushed by the driver
81 on the communication socket to upsd (Unix socket on Unix, Named
82 pipe on Windows) without waiting for these data to be actually
83 consumed. With some HW, such as ePDUs, that can produce a lot of
84 data, asynchronous mode may cause some congestion, resulting in the
85 socket to be full, and the driver to appear as not connected. In
86 such case, the driver will provide the following debug message:
87
88 write XX bytes to socket Y failed
89
90 By enabling the synchronous flag (value = yes), the driver will
91 wait for data to be consumed by upsd, prior to publishing more.
92 This can be enabled either globally or per driver.
93
94 The default is no (i.e. asynchronous mode) for backward
95 compatibility of the driver behavior.
96
97 user
98 Optional. If started as root, the driver will setuid(2) to the user
99 id associated with username.
100
102 driver
103 Required. This specifies which program will be monitoring this UPS.
104 You need to specify the one that is compatible with your hardware.
105 See nutupsdrv(8) for more information on drivers in general and
106 pointers to the man pages of specific drivers.
107
108 port
109 Required. This is the serial port where the UPS is connected. On a
110 Linux system, the first serial port usually is /dev/ttyS0. On
111 FreeBSD and similar systems, it probably will be /dev/cuaa0.
112
113 sdorder
114 Optional. When you have multiple UPSes on your system, you usually
115 need to turn them off in a certain order. upsdrvctl shuts down all
116 the 0s, then the 1s, 2s, and so on. To exclude a UPS from the
117 shutdown sequence, set this to -1.
118
119 The default value for this parameter is 0.
120
121 desc
122 Optional. This allows you to set a brief description that upsd will
123 provide to clients that ask for a list of connected equipment.
124
125 nolock
126 Optional. When you specify this, the driver skips the port locking
127 routines every time it starts. This may allow other processes to
128 seize the port if you start more than one accidentally.
129
130 You should only use this if your system won’t work without it.
131
132 This may be needed on Mac OS X systems.
133
134 ignorelb
135 Optional. When you specify this, the driver ignores a low battery
136 condition flag that is reported by the UPS (some devices will
137 switch off almost immediately after setting this flag, or will
138 report this as soons as the mains fails). Instead it will use
139 either of the following conditions to determine when the battery is
140 low:
141
142 battery.charge < battery.charge.low
143 battery.runtime < battery.runtime.low
144
145 The idea is to set the battery.charge.low and/or
146 battery.runtime.low levels in ups.conf to a value that gives enough
147 time to cleanly shutdown your system:
148
149 override.battery.charge.low = 30
150 override.battery.runtime.low = 180
151
152 In order for this to work, your UPS should be able to (reliably)
153 report charge and/or runtime remaining on battery. Use with
154 caution!
155
156 maxstartdelay
157 Optional. This can be set as a global variable above your first UPS
158 definition and it can also be set in a UPS section. This value
159 controls how long upsdrvctl will wait for the driver to finish
160 starting. This keeps your system from getting stuck due to a broken
161 driver or UPS.
162
163 The default is 45 seconds.
164
165 synchronous
166 Optional. Same as the global directive of the same name, but this
167 is for a specific device.
168
169 usb_set_altinterface[=altinterface]
170 Optional. Force the USB code to call usb_set_altinterface(0), as
171 was done in NUT 2.7.2 and earlier. This should not be necessary,
172 since the default for bAlternateSetting (as shown in lsusb) is zero
173 on all USB devices seen to date. However, this redundant call to
174 usb_set_altinterface() prevents certain UPSes from working on Mac
175 OS X. If your UPS requires explicitly setting the alternate
176 interface, include this flag, and email the nut-upsdev list with
177 details about your UPS and operating system.
178
179 default.<variable>
180 Optional. Set a default value for <variable> which is used in case
181 the UPS doesn’t provide a value, but will be overwritten if a value
182 is available from the UPS:
183
184 default.input.voltage.nominal = 230
185
186 The above will report the nominal input voltage to be 230, unless
187 the UPS tells us differently.
188
189 override.<variable>
190 Optional. Set a value for <value> that overrides any value that may
191 be read from the UPS. Used for overriding values from the UPS that
192 are clearly wrong (some devices report wrong values for battery
193 voltage for instance):
194
195 override.battery.voltage.nominal = 12
196
197 Use with caution! This will only change the appearance of the
198 variable to the outside world, internally in the UPS the original
199 value is used.
200
201 All other fields are passed through to the hardware-specific part of
202 the driver. See those manuals for the list of what is allowed.
203
205 upsdrvctl(8) uses this file to start and stop the drivers.
206
207 The drivers themselves also obtain configuration data from this file.
208 Each driver looks up its section and uses that to configure itself.
209
210 upsd(8) learns about which UPSes are installed on this system by
211 reading this file. If this system is called "doghouse" and you have
212 defined a UPS in your ups.conf called "snoopy", then you can monitor it
213 from upsc(8) or similar as "snoopy@doghouse".
214
216 upsd(8), nutupsdrv(8), upsdrvctl(8)
217
218 Internet resources
219 The NUT (Network UPS Tools) home page: http://www.networkupstools.org/
220
221
222
223Network UPS Tools 2.7.3. 12/29/2015 UPS.CONF(5)