1UPSDRVCTL(8) NUT Manual UPSDRVCTL(8)
2
3
4
6 upsdrvctl - UPS driver controller
7
9 upsdrvctl -h
10
11 upsdrvctl [OPTIONS] {start | stop | shutdown} [ups]
12
14 upsdrvctl provides a uniform interface for controlling your UPS
15 drivers. You should use upsdrvctl instead of direct calls to the
16 drivers whenever possible.
17
18 When used properly, upsdrvctl lets you maintain identical startup
19 scripts across multiple systems with different UPS configurations.
20
22 -h
23 Display the help text.
24
25 -r directory
26 If starting a driver, this value will direct it to chroot(2) into
27 directory. This can be useful when securing systems.
28
29 This may be set in the ups.conf with "chroot" in the global section.
30
31 -t
32 Enable testing mode. This also enables debug mode. Testing mode
33 makes upsdrvctl display the actions it would execute without
34 actually doing them. Use this to test out your configuration
35 without actually doing anything to your UPS drivers. This may be
36 helpful when defining the sdorder directive in your ups.conf(5).
37
38 -u username
39 If starting a driver, this value will direct it to setuid(2) to the
40 user id associated with username.
41
42 If the driver is started as root without specifying this value, it will
43 use the username that was compiled into the binary. This defaults to
44 "nobody", and is far from ideal.
45
46 This may be set in ups.conf with "user" in the global section.
47
48 -D
49 Raise the debug level. Use this multiple times for additional
50 details.
51
53 upsdrvctl supports three commands - start, stop and shutdown. They take
54 an optional argument which is a UPS name from ups.conf(5). Without that
55 argument, they operate on every UPS that is currently configured.
56
57 start
58 Start the UPS driver(s).
59
60 stop
61 Stop the UPS driver(s).
62
63 shutdown
64 Command the UPS driver(s) to run their shutdown sequence. Drivers
65 are stopped according to their sdorder value - see ups.conf(5).
66
67 Warning
68 this will probably power off your computers, so don’t play around
69 with this option. Only use it when your systems are prepared to
70 lose power.
71
73 NUT_CONFPATH is the path name of the directory that contains upsd.conf
74 and other configuration files. If this variable is not set, upsdrvctl
75 the driver use a built-in default, which is often /usr/local/ups/etc.
76
78 upsdrvctl will return a nonzero exit code if it encounters an error
79 while performing the desired operation. This will also happen if a
80 driver takes longer than the maxstartdelay period to enter the
81 background.
82
84 nutupsdrv(8), upsd(8), ups.conf(5)
85
86 Internet resources:
87 The NUT (Network UPS Tools) home page: http://www.networkupstools.org/
88
89
90
91Network UPS Tools 09/15/2011 UPSDRVCTL(8)