1UPSDRVCTL(8)                      NUT Manual                      UPSDRVCTL(8)
2
3
4

NAME

6       upsdrvctl - UPS driver controller
7

SYNOPSIS

9       upsdrvctl -h
10
11       upsdrvctl [OPTIONS] {start | stop | shutdown} [ups]
12

DESCRIPTION

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
21       Note: For operating systems with service management frameworks, such as
22       Solaris SMF or Linux systemd, the upsdrvsvcctl may be a better choice.
23

OPTIONS

25       -h
26           Display the help text.
27
28       -r directory
29           If starting a driver, this value will direct it to chroot(2) into
30           directory. This can be useful when securing systems.
31
32       This may be set in the ups.conf with "chroot" in the global section.
33
34       -t
35           Enable testing mode. This also enables debug mode. Testing mode
36           makes upsdrvctl display the actions it would execute without
37           actually doing them. Use this to test out your configuration
38           without actually doing anything to your UPS drivers. This may be
39           helpful when defining the sdorder directive in your ups.conf(5).
40
41       -u username
42           If starting a driver, this value will direct it to setuid(2) to the
43           user id associated with username.
44
45       If the driver is started as root without specifying this value, it will
46       use the username that was compiled into the binary. This defaults to
47       "nobody", and is far from ideal.
48
49       This may be set in ups.conf with "user" in the global section.
50
51       -D
52           Raise the debug level. Use this multiple times for additional
53           details.
54
55       -d
56           Pass the selected debug level from upsdrvctl to launched drivers.
57

COMMANDS

59       upsdrvctl supports three commands - start, stop and shutdown. They take
60       an optional argument which is a UPS name from ups.conf(5). Without that
61       argument, they operate on every UPS that is currently configured.
62
63       start
64           Start the UPS driver(s). In case of failure, further attempts may
65           be executed by using the maxretry and retrydelay options - see
66           ups.conf(5).
67
68       stop
69           Stop the UPS driver(s).
70
71       shutdown
72           Command the UPS driver(s) to run their shutdown sequence. Drivers
73           are stopped according to their sdorder value - see ups.conf(5).
74
75           Warning
76           this will probably power off your computers, so don’t play around
77           with this option. Only use it when your systems are prepared to
78           lose power.
79
80           Note
81           refer to ups.conf(5) for using the nowait parameter.
82

ENVIRONMENT VARIABLES

84       NUT_CONFPATH is the path name of the directory that contains upsd.conf
85       and other configuration files. If this variable is not set, upsdrvctl
86       the driver use a built-in default, which is often /usr/local/ups/etc.
87

DIAGNOSTICS

89       upsdrvctl will return a nonzero exit code if it encounters an error
90       while performing the desired operation. This will also happen if a
91       driver takes longer than the maxstartdelay period to enter the
92       background.
93

SEE ALSO

95       upsdrvsvcctl(8), nutupsdrv(8), upsd(8), ups.conf(5)
96
97   Internet resources:
98       The NUT (Network UPS Tools) home page: http://www.networkupstools.org/
99
100
101
102Network UPS Tools 2.8.0           04/26/2022                      UPSDRVCTL(8)
Impressum