nut/man/upsd.8
2010-03-26 00:20:59 +01:00

158 lines
5.3 KiB
Groff

.TH UPSD 8 "Mon Nov 30 2009" "" "Network UPS Tools (NUT)"
.SH NAME
upsd \- UPS information server
.SH SYNOPSIS
.B upsd \-h
.B upsd [OPTIONS]
.SH DESCRIPTION
.B upsd
is responsible for serving the data from the drivers to the clients. It
connects to each driver and maintains a local cache of the current
state. Queries from the clients are served from this cache, so delays
are minimal.
It also conveys administrative messages from the clients such as
starting tests or setting values back to the drivers.
This program is essential, and must be running at all times to actually
make any use out of the drivers and clients.
Controls in the configuration files allow you to limit access to the
server, but you should also use a firewall for extra protection. Client
processes such as \fBupsmon\fR(8) trust upsd for status information about
the UPS hardware, so keep it secure.
.SH OPTIONS
.IP "\-c \fIcommand\fR"
Send \fIcommand\fR to the background process as a signal. Valid commands
are:
.IP
.nf
reload \(hy reread configuration files
stop \(hy stop process and exit
.fi
.LP
.IP "\-D"
Raise the debug level. Use this multiple times for additional details.
.IP "\-h"
Display the help text.
.IP "\-r \fIdirectory\fR"
upsd will \fBchroot\fR(2) to \fIdirectory\fR shortly after startup
and before parsing any configuration files with this option set. You
can use this to create a "jail" for greater security.
You must coordinate this with your drivers, as upsd must be able to find
the state path within \fIdirectory\fR. See \fBupsdrvctl\fR(8) and
\fBnutupsdrv\fR(8).
.IP "\-u \fIuser\fR"
Switch to user \fIuser\fR after startup if started as root. This
overrides whatever you may have compiled in with 'configure
\-\-with\-user'.
.IP "\-V"
Display the version of the program.
.SH RELOADING
upsd can reload its configuration files without shutting down the process
if you send it a SIGHUP or start it again with '\-c reload'. This only works
if the background process is able to read those files.
If you think that upsd can't reload, check your syslogs for error messages.
If it's complaining about not being able to read the files, then you need
to adjust your system to make it possible. Either change the permissions
on the files, or run upsd as another user that will be able to read them.
DO NOT make your upsd.conf or upsd.users world\(hyreadable, as those files
hold important authentication information. In the wrong hands, it could
be used by some evil person to spoof your master upsmon and command your
systems to shut down.
.SH DIAGNOSTICS
upsd expects the drivers to either update their status regularly or at
least answer periodic queries, called pings. If a driver doesn't
answer, upsd will declare it "stale" and no more information will be
provided to the clients.
If upsd complains about staleness when you start it, then either your
driver or configuration files are probably broken. Be sure that the
driver is actually running, and that the UPS definition in
\fBups.conf\fR(5) is correct. Also make sure that you start your
driver(s) before starting upsd.
Data can also be marked stale if the driver can no longer communicate
with the UPS. In this case, the driver should also provide diagnostic
information in the syslog. If this happens, check the serial or
USB cabling, or inspect the network path in the case of a SNMP UPS.
.SH ACCESS CONTROL
If the server is build with tcp-wrappers support enabled, it will check if
the NUT username is allowed to connect from the client address through the
\fB/etc/hosts.allow\fR and \fB/etc/hosts.deny\fR files. Note that this will
only be done for commands that require to be logged into the server.
.IP
.nf
hosts.allow:
------------
upsd : admin@127.0.0.1/32
upsd : monslave@127.0.0.1/32 monslave@192.168.1.0/24
hosts.deny:
-----------
upsd : ALL
.fi
.LP
Further details are described in \fBhosts_access\fR(5).
.SH FILES
The general upsd configuration file is \fBupsd.conf\fR(5). The
administrative functions like SET and INSTCMD for users are defined and
controlled in \fBupsd.users\fR(5). UPS definitions are found in
\fBups.conf\fR(5).
.SH ENVIRONMENT VARIABLES
\fBNUT_CONFPATH\fR is the path name of the directory that contains
\fBupsd.conf\fR and other configuration files. If this variable is not set,
\fBupsd\fR uses a built\(hyin default, which is often \fB/usr/local/ups/etc\fR.
\fBNUT_STATEPATH\fR is the path name of the directory in which
\fBupsd\fR keeps state information. If this variable is not set,
\fBupsd\fR uses a built\(hyin default, which is often \fB/var/state/ups\fR.
The \fBSTATEPATH\fR directive in \fBupsd.conf\fR overrides this variable.
.SH SEE ALSO
.SS Clients:
\fBupsc\fR(8), \fBupscmd\fR(8),
\fBupsrw\fR(8), \fBupslog\fR(8), \fBupsmon\fR(8)
.SS CGI programs:
\fBupsset.cgi\fR(8), \fBupsstats.cgi\fR(8), \fBupsimage.cgi\fR(8)
.SS Drivers:
\fBnutupsdrv\fR(8),
\fBapcsmart\fR(8), \fBbelkin\fR(8), \fBbelkinunv\fR(8),
\fBbestuferrups\fR(8), \fBbestups\fR(8),
\fBcyberpower\fR(8), \fBenergizerups\fR(8), \fBetapro\fR(8),
\fBeverups\fR(8), \fBgenericups\fR(8),
\fBisbmex\fR(8), \fBliebert\fR(8), \fBmasterguard\fR(8),
\fBmge\(hyshut\fR(8), \fBmge\(hyutalk\fR(8), \fBoneac\fR(8),
\fBpowercom\fR(8), \fBsafenet\fR(8), \fBsnmp\-ups\fR(8),
\fBtripplite\fR(8), \fBtripplitesu\fR(8), \fBvictronups\fR(8),
.SS Internet resources:
The NUT (Network UPS Tools) home page: http://www.networkupstools.org/