1NUTUPSDRV(8) NUT Manual NUTUPSDRV(8)
2
3
4
6 nutupsdrv - generic manual for unified NUT drivers
7
9 nutupsdrv -h
10
11 nutupsdrv [OPTIONS]
12
14 nutupsdrv is not actually a driver. This is a combined man page for the
15 shared code that is the core of many drivers within the Network UPS
16 Tools package.
17
18 For information on the specific drivers, see their individual man
19 pages.
20
21 UPS drivers provide a communication channel between the physical UPS
22 hardware and the upsd(8) server. The driver is responsible for
23 translating the native protocol of the UPS to the common format used by
24 the rest of this package.
25
26 The core has three modes of operation which are determined by the
27 command line switches. In the normal mode, the driver will periodically
28 poll the UPS for its state and parameters, as per the pollinterval
29 parameter in ups.conf(5). The results of this command are presented to
30 upsd. The driver will also handle setting variables and instant
31 commands if available.
32
33 In the second mode, using -k, the driver can instruct the UPS to shut
34 down the load, possibly after some delay. This mode of operation is
35 intended for cases when it is known that the UPS is running out of
36 battery power and the systems attached must be turned off to ensure a
37 proper reboot when power returns.
38
39 In the third mode, using -d, the driver will exit after some update
40 loops, dumping the data tree (in upsc-like format) to stdout. This can
41 be useful to complement the nut-scanner to discover devices, along with
42 in-depth data.
43
44 Note
45 You probably don’t want to use any of these options directly. You
46 should use upsdrvctl(8) to control your drivers, and ups.conf(5) to
47 configure them. The rest of this manual describes options and
48 parameters that generally are not needed by normal users.
49
51 -h
52 Display a help message without doing anything else. This will also
53 list possible values for -x in that driver, and other help text
54 that the driver’s author may have provided.
55
56 -a id
57 Autoconfigure this driver using the id section of ups.conf(5).
58 This argument is mandatory when calling the driver directly.
59
60 -s id
61 Configure this driver only with command line arguments instead of
62 reading ups.conf(5). To be used instead of -a option when need to
63 run a driver not present in driver configuration file. Instead,
64 driver configuration have to be set with -x options directly in the
65 command line. As the driver instance cannot be controlled by
66 upsdrvctl(8), this option should be used for specific needs only.
67
68 -D
69 Raise the debugging level. Use this multiple times to see more
70 details. Running a driver in debug mode will (by default) prevent
71 it from backgrounding after startup. It will keep on logging
72 information to the console until it receives a SIGINT (usually
73 Ctrl-C) or SIGTERM signal.
74
75 The level of debugging needed depends both on the driver and the
76 problem you’re trying to diagnose. Therefore, first explain the
77 problem you have with a driver to a developer/maintainer, before
78 sending them debugging output. More often than not, if you just
79 pick a level, the output may be either too limited or too verbose
80 to be of any use.
81
82 -d update_count
83 Dump the data tree (in upsc-like format) to stdout after running
84 the driver update loop for update_count times and exit. By default
85 this prevents the driver process from backgrounding after startup.
86 Note that the driver banner will be printed too, so when using this
87 option in scripts, don’t forget to trim the first line.
88
89 -q
90 Raise log level threshold. Use this multiple times to log more
91 details.
92
93 The debugging comment above also applies here.
94
95 -F
96 Enforce running the driver as a foreground process, regardless of
97 debugging or data-dumping settings.
98
99 -B
100 Enforce running the driver as a background process, regardless of
101 debugging or data-dumping settings.
102
103 -i interval
104 Set the poll interval for the device. The default value is 2 (in
105 seconds).
106
107 -V
108 Print only version information, then exit.
109
110 -L
111 Print a parsable list of driver variables. Mostly useful for
112 configuration wizard programs.
113
114 -k
115 ("Kill" power) Forced shutdown mode. The UPS will power off the
116 attached load, if possible.
117
118 You should use upsdrvctl shutdown whenever possible instead of
119 calling this directly.
120
121 -r directory
122 The driver will chroot(2) to directory during initialization. This
123 can be useful when securing systems.
124
125 In addition to the state path, many systems will require /dev/null
126 to exist within directory for this to work. The serial ports are
127 opened before the chroot call, so you do not need to create them
128 inside the jail. In fact, it is somewhat safer if you do not.
129
130 -u username
131 Override the unprivileged username that the driver may use after
132 startup. If started as root, after opening configuration files (and
133 optionally calling chroot(2), as described in the previous option),
134 the driver will look up username in the passwd database, then
135 change to the user and group identities associated with username.
136 (If started with a nonzero UID or effective UID, the driver will
137 silently ignore this option.)
138
139 When compiling NUT from source, the default username is typically
140 nobody, and this may cause permission errors when the driver opens
141 the UPS device node. You can use this option to temporarily
142 override the defaults. For testing purposes, you can set this
143 option to root to bypass permission errors, especially with
144 USB-based drivers. However, you will want to remove this option
145 later in order to avoid permission conflicts between the driver and
146 the unprivileged copy of upsd(8).
147
148 -g groupname
149 Override the unprivileged group name that the driver may use after
150 startup to set permissions for the filesystem socket so upsd may
151 still access it if the run-time user of the driver normally would
152 deny that access.
153
154 -x var=val
155 Define a variable called var with the value of var in the driver.
156 This varies from driver to driver - see the specific man pages for
157 more information.
158
159 This is like setting var=val in ups.conf(5), but -x overrides any
160 settings from that file.
161
163 Information about the startup process is printed to stdout. Additional
164 messages after that point are available in the syslog. After upsd(8)
165 starts, the UPS clients such as upsc(8) can be used to query the status
166 of an UPS.
167
169 You should always use upsdrvctl(8) to control the drivers. While
170 drivers can be started by hand for testing purposes, it is not
171 recommended for production use.
172
174 ups.conf
175 Required configuration file. This contains all details on which
176 drivers to start and where the hardware is attached.
177
179 NUT_CONFPATH is the path name of the directory that contains upsd.conf
180 and other configuration files. If this variable is not set, upsd uses a
181 built-in default, which is often /usr/local/ups/etc.
182
183 NUT_STATEPATH is the path name of the directory in which upsd keeps
184 state information. If this variable is not set, upsd uses a built-in
185 default, which is often /var/state/ups. The STATEPATH directive in
186 upsd.conf(5) overrides this variable.
187
188 NUT_ALTPIDPATH is the path name of the directory in which upsd and
189 drivers store .pid files. If this variable is not set, upsd and drivers
190 use either NUT_STATEPATH if set, or ALTPIDPATH if set, or otherwise the
191 built-in default STATEPATH.
192
194 Some of the drivers may have bugs. See their manuals for more
195 information.
196
198 Server:
199 • upsd(8)
200
201 Clients:
202 • upsc(8)
203
204 • upscmd(8)
205
206 • upsrw(8)
207
208 • upslog(8)
209
210 • upsmon(8)
211
212 CGI programs:
213 • upsset.cgi(8)
214
215 • upsstats.cgi(8)
216
217 • upsimage.cgi(8)
218
219 Driver control:
220 • nut-driver-enumerator(8)
221
222 • upsdrvctl(8)
223
224 • upsdrvsvcctl(8)
225
226 Drivers:
227 • adelsystem_cbi(8)
228
229 • al175(8)
230
231 • apcsmart-old(8)
232
233 • apcsmart(8)
234
235 • apcupsd-ups(8)
236
237 • asem(8)
238
239 • bcmxcp(8)
240
241 • bcmxcp_usb(8)
242
243 • belkin(8)
244
245 • belkinunv(8)
246
247 • bestfcom(8)
248
249 • bestfortress(8)
250
251 • bestuferrups(8)
252
253 • bestups(8)
254
255 • blazer-common(8)
256
257 • blazer_ser(8)
258
259 • blazer_usb(8)
260
261 • clone(8)
262
263 • dummy-ups(8)
264
265 • etapro(8)
266
267 • everups(8)
268
269 • gamatronic(8)
270
271 • generic_modbus(8)
272
273 • genericups(8)
274
275 • huawei-ups2000(8)
276
277 • isbmex(8)
278
279 • ivtscd(8)
280
281 • liebert-esp2(8)
282
283 • liebert(8)
284
285 • macosx-ups(8)
286
287 • masterguard(8)
288
289 • metasys(8)
290
291 • mge-shut(8)
292
293 • mge-utalk(8)
294
295 • microdowell(8)
296
297 • microsol-apc(8)
298
299 • netxml-ups(8)
300
301 • nut-ipmipsu(8)
302
303 • nutdrv_atcl_usb(8)
304
305 • nutdrv_qx(8)
306
307 • nutdrv_siemens_sitop(8)
308
309 • oneac(8)
310
311 • optiups(8)
312
313 • phoenixcontact_modbus(8)
314
315 • pijuice(8)
316
317 • powercom(8)
318
319 • powerman-pdu(8)
320
321 • powerpanel(8)
322
323 • rhino(8)
324
325 • richcomm_usb(8)
326
327 • riello_ser(8)
328
329 • riello_usb(8)
330
331 • safenet(8)
332
333 • snmp-ups(8)
334
335 • socomec_jbus(8)
336
337 • solis(8)
338
339 • tripplite(8)
340
341 • tripplite_usb(8)
342
343 • tripplitesu(8)
344
345 • upscode2(8)
346
347 • usbhid-ups(8)
348
349 • victronups(8)
350
351 Internet resources:
352 The NUT (Network UPS Tools) home page: http://www.networkupstools.org/
353
354
355
356Network UPS Tools 2.8.0 04/26/2022 NUTUPSDRV(8)