1
.TH UPSDRVCTL 8 "Wed Feb 6 2002" "" "Network UPS Tools (NUT)"
1
.TH UPSDRVCTL 8 "Wed Feb 18 2004" "" "Network UPS Tools (NUT)"
3
3
upsdrvctl \- UPS driver controller
7
.B upsdrvctl [-t] [-v] (start | stop | shutdown | status) [\fIups\fB]
7
.B upsdrvctl [OPTIONS] {start | stop | shutdown} [\fIups\fB]
11
11
upsdrvctl provides a uniform interface for controlling your UPS drivers.
12
The intention is for users to always use upsdrvctl for starting and stopping
13
them rather than hard-coding driver calls into their startup scripts.
12
You should use upsdrvctl instead of direct calls to the drivers
15
15
When used properly, upsdrvctl lets you maintain identical startup
16
16
scripts across multiple systems with different UPS configurations.
21
21
Display the help message.
23
.IP "-r \fIdirectory\fR"
24
If starting a driver, this value will direct it to \fBchroot\fR(2) into
25
\fIdirectory\fR. This can be useful when securing systems.
24
28
Enable testing mode. This also enables verbose mode. Testing mode makes
25
29
upsdrvctl display the actions it would execute without actually doing them.
27
31
to your UPS drivers. This may be helpful when defining the 'sdorder'
28
32
directive in your \fBups.conf\fR(5).
34
.IP "-u \fIusername\fR"
35
If starting a driver, this value will direct it to \fBsetuid\fR(2) to
36
the user id associated with \fIusername\fR.
38
If the driver is started as root without specifying this value, it will
39
use the username that was compiled into the binary. This defaults to
40
"nobody", and is far from ideal.
31
43
Enable verbose messages.
35
upsdrvctl supports three commands - start, stop, and status. They take
47
upsdrvctl supports three commands - start, stop and shutdown. They take
36
48
an optional argument which is a UPS name from \fBups.conf\fR(5).
37
49
Without that argument, they operate on every UPS that is currently
44
56
Stop the UPS driver(s).
47
Command the UPS driver(s) to run their shutdown sequence. This is
48
equivalent to manually starting each driver with the -k argument.
49
Drivers are stopped according to their sdorder value - see \fBups.conf\fR(5).
52
Check the status of the UPS driver(s).
54
If every UPS that has been checked is running, then the exitcode will be
55
0. If one seems to be missing, the exitcode will be 1.
59
Old drivers can't be controlled with upsdrvctl. While many popular
60
drivers have been converted, there are still a number that have not.
61
If your hardware uses an older driver, you must call it directly.
63
You can find out if your driver is new or old by starting it with -h
64
to see the help text. If it mentions '-a' to autoconfigure, then you
65
have a new driver. Otherwise, it's old.
67
In this case, consider converting the driver yourself, then send in a patch.
71
The status checking is rudimentary, and really only looks for the
72
presence of .pid files. If you really want to know if your UPS drivers
73
are alive and well, \fBupsmon\fR(8)'s NOCOMM notifier does a fine job.
59
Command the UPS driver(s) to run their shutdown sequence. Drivers are
60
stopped according to their sdorder value - see \fBups.conf\fR(5).
62
WARNING: this will probably power off your computers, so don't
63
play around with this option. Only use it when your systems are prepared
66
.SH ENVIRONMENT VARIABLES
67
\fBNUT_CONFPATH\fR is the path name of the directory that contains
68
\fBups.conf\fR. If this variable is not set, \fBupsdrvctl\fR and the
69
driver use a built-in default, which is often \fB/usr/local/ups/etc\fR.
76
72
\fBnutupsdrv\fR(8), \fBupsd\fR(8) \fBups.conf\fR(5)
78
74
.SS Internet resources:
79
The NUT (Network UPS Tools) home page: http://www.exploits.org/nut/
81
NUT mailing list archives and information: http://lists.exploits.org/
75
The NUT (Network UPS Tools) home page: http://www.networkupstools.org/