nut-debian/docs/man/ups.conf.5
2011-01-26 10:35:08 +01:00

156 lines
6.0 KiB
Groff

'\" t
.\" Title: ups.conf
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
.\" Date: 12/24/2010
.\" Manual: NUT Manual
.\" Source: Network UPS Tools
.\" Language: English
.\"
.TH "UPS\&.CONF" "5" "12/24/2010" "Network UPS Tools" "NUT Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
ups.conf \- UPS definitions for Network UPS Tools
.SH "DESCRIPTION"
.sp
This file is read by the driver controller \fBupsdrvctl\fR(8), the UPS drivers that use the common core (see \fBnutupsdrv\fR(8), and \fBupsd\fR(8))\&. The file begins with global directives, and then each UPS has a section which contains a number of directives that set parameters for that UPS\&.
.sp
A UPS section begins with the name of the UPS in brackets, and continues until the next UPS name in brackets or until EOF\&. The name "default" is used internally in upsd, so you can\(cqt use it in this file\&.
.sp
You must define the \fIdriver\fR and \fIport\fR elements for each entry\&. Anything after that in a section is optional\&. A simple example might look like this:
.sp
.if n \{\
.RS 4
.\}
.nf
[myups]
driver = blazer_ser
port = /dev/ttyS0
desc = "Web server UPS"
.fi
.if n \{\
.RE
.\}
.sp
A slightly more complicated version includes some extras for the hardware\-specific part of the driver:
.sp
.if n \{\
.RS 4
.\}
.nf
[bigups]
driver = apcsmart
port = /dev/cua00
cable = 940\-0095B
sdtype = 2
desc = "Database server UPS"
.fi
.if n \{\
.RE
.\}
.sp
In this case, the \fBapcsmart\fR(8) driver will receive variables called "cable" and "sdtype" which have special meanings\&. See the man pages of your driver(s) to learn which variables are supported and what they do\&.
.SH "GLOBAL DIRECTIVES"
.PP
\fBchroot\fR
.RS 4
Optional\&. The driver will chroot(2) to this directory during initialization\&. This can be useful when securing systems\&.
.RE
.PP
\fBdriverpath\fR
.RS 4
Optional\&. Path name of the directory in which the UPS driver executables reside\&. If you don\(cqt specify this, the programs look in a built\-in default directory, which is often /usr/local/ups/bin\&.
.RE
.PP
\fBmaxstartdelay\fR
.RS 4
Optional\&. Same as the UPS field of the same name, but this is the default for UPSes that don\(cqt have the field\&.
.RE
.PP
\fBpollinterval\fR
.RS 4
Optional\&. The status of the UPS will be refreshed after a maximum delay which is controlled by this setting\&. This is normally 2 seconds\&. This may be useful if the driver is creating too much of a load on your system or network\&.
.RE
.PP
\fBuser\fR
.RS 4
Optional\&. If started as root, the driver will setuid(2) to the user id associated with
\fIusername\fR\&.
.RE
.SH "UPS FIELDS"
.PP
\fBdriver\fR
.RS 4
Required\&. This specifies which program will be monitoring this UPS\&. You need to specify the one that is compatible with your hardware\&. See
\fBnutupsdrv\fR(8)
for more information on drivers in general and pointers to the man pages of specific drivers\&.
.RE
.PP
\fBport\fR
.RS 4
Required\&. This is the serial port where the UPS is connected\&. On a Linux system, the first serial port usually is
\fI/dev/ttyS0\fR\&. On FreeBSD and similar systems, it probably will be
\fI/dev/cuaa0\fR\&.
.RE
.PP
\fBsdorder\fR
.RS 4
Optional\&. When you have multiple UPSes on your system, you usually need to turn them off in a certain order\&. upsdrvctl shuts down all the 0s, then the 1s, 2s, and so on\&. To exclude a UPS from the shutdown sequence, set this to \-1\&.
.sp
The default value for this parameter is 0\&.
.RE
.PP
\fBdesc\fR
.RS 4
Optional\&. This allows you to set a brief description that upsd will provide to clients that ask for a list of connected equipment\&.
.RE
.PP
\fBnolock\fR
.RS 4
Optional\&. When you specify this, the driver skips the port locking routines every time it starts\&. This may allow other processes to seize the port if you start more than one accidentally\&.
.sp
You should only use this if your system won\(cqt work without it\&.
.sp
This may be needed on Mac OS X systems\&.
.RE
.PP
\fBmaxstartdelay\fR
.RS 4
Optional\&. This can be set as a global variable above your first UPS definition and it can also be set in a UPS section\&. This value controls how long upsdrvctl will wait for the driver to finish starting\&. This keeps your system from getting stuck due to a broken driver or UPS\&.
.sp
The default is 45 seconds\&.
.RE
.sp
All other fields are passed through to the hardware\-specific part of the driver\&. See those manuals for the list of what is allowed\&.
.SH "INTEGRATION"
.sp
\fBupsdrvctl\fR(8) uses this file to start and stop the drivers\&.
.sp
The drivers themselves also obtain configuration data from this file\&. Each driver looks up its section and uses that to configure itself\&.
.sp
\fBupsd\fR(8) learns about which UPSes are installed on this system by reading this file\&. If this system is called "doghouse" and you have defined a UPS in your \fBups\&.conf\fR called "snoopy", then you can monitor it from \fBupsc\fR(8) or similar as "snoopy@doghouse"\&.
.SH "SEE ALSO"
.sp
\fBupsd\fR(8), \fBnutupsdrv\fR(8), \fBupsdrvctl\fR(8)
.SS "Internet resources"
.sp
The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/