~ubuntu-branches/ubuntu/saucy/nut/saucy

« back to all changes in this revision

Viewing changes to man/upsdrvctl.8

  • Committer: Bazaar Package Importer
  • Author(s): Arnaud Quette
  • Date: 2004-05-28 13:10:01 UTC
  • mto: (16.1.1 squeeze)
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20040528131001-yj2m9qcez4ya2w14
Tags: upstream-1.4.2
ImportĀ upstreamĀ versionĀ 1.4.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
.TH UPSDRVCTL 8 "Wed Feb  6 2002" "" "Network UPS Tools (NUT)"
 
1
.TH UPSDRVCTL 8 "Wed Feb 18 2004" "" "Network UPS Tools (NUT)"
2
2
.SH NAME
3
3
upsdrvctl \- UPS driver controller
4
4
.SH SYNOPSIS
5
5
.B upsdrvctl -h
6
6
 
7
 
.B upsdrvctl [-t] [-v] (start | stop | shutdown | status) [\fIups\fB]
 
7
.B upsdrvctl [OPTIONS] {start | stop | shutdown} [\fIups\fB]
8
8
 
9
9
.SH DESCRIPTION
10
10
 
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
 
13
whenever possible.
14
14
 
15
15
When used properly, upsdrvctl lets you maintain identical startup
16
16
scripts across multiple systems with different UPS configurations.
20
20
.IP -h
21
21
Display the help message.
22
22
 
 
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.
 
26
 
23
27
.IP -t
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).
29
33
 
 
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.
 
37
 
 
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.
 
41
 
30
42
.IP -v
31
43
Enable verbose messages.
32
44
 
33
45
.SH COMMANDS
34
46
 
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
38
50
configured.
44
56
Stop the UPS driver(s).
45
57
 
46
58
.IP shutdown
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).
50
 
 
51
 
.IP status
52
 
Check the status of the UPS driver(s).
53
 
 
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.
56
 
 
57
 
.SH OLD DRIVERS
58
 
 
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.
62
 
 
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.
66
 
 
67
 
In this case, consider converting the driver yourself, then send in a patch.
68
 
 
69
 
.SH BUGS
70
 
 
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).
 
61
 
 
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
 
64
to lose power.
 
65
 
 
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.
74
70
 
75
71
.SH SEE ALSO
76
72
\fBnutupsdrv\fR(8), \fBupsd\fR(8) \fBups.conf\fR(5)
77
73
 
78
74
.SS Internet resources:
79
 
The NUT (Network UPS Tools) home page: http://www.exploits.org/nut/
80
 
 
81
 
NUT mailing list archives and information: http://lists.exploits.org/
 
75
The NUT (Network UPS Tools) home page: http://www.networkupstools.org/