UPS.CONF(5)

NAME
ups.conf - UPS definitions for Network UPS Tools

DESCRIPTION
This file is read by the driver controller upsdrvctl, the UPS drivers that use the common core (see nutupsdrv(8)) and upsd(8). Each UPS gets its own section, and that section contains a number of directives that set parameters for that UPS. The 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't use it in this file. You must define the "driver" and "port" elements for each entry. Anything after that in a section is optional. A simple example might look like this:

    	[myups]
    		driver = fentonups
    		port = /dev/ttyS0

A slightly more complicated version includes some extras for the hardware-specific part of the driver:

    	[bigups]
    		driver = apcsmart
    		port = /dev/cua00
    		cable = 940-0095B
    		sdtype = 2

In this case, the apcsmart(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. Note that "cable" and "sdtype" are the same values that apcsmart(8) will accept on the command line via -x. All options that can be specified with -x can be set here in this file. In the event that a value is set both here and on the command line, the command line takes precedence. This allows you to set reasonable defaults in this file and then override them manually when needed.

FIELDS

driver
    Required. This specifies which program will be monitoring this UPS. You need to specify the one that is compatible with your hardware. See nutupsdrv(8) for more information on drivers in general and pointers to the man pages of specific drivers.

port
    Required. This is the serial port where the UPS is connected. On a Linux system, the first serial port usually is /dev/ttyS0. On FreeBSD and similar systems, it probably will be /dev/cuaa0.

sddelay
    Optional. You can set this to a number of seconds that the driver will allow to elapse when you tell it to shut down the UPS with -k. This is the same as doing -d <num> on the command line.

nolock
    Optional, and not recommended for use in this file. 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.

    This is intended to be used on systems where locking is not possible with a read-only filesystem such as FreeBSD. Use it on the commandline when you shutdown:

    	/bin/driver -x nolock -k /dev/port

All other fields are passed through to the hardware-specific part of the driver. See those manuals for the list of what is allowed.

INTEGRATION
upsdrvctl uses this file to start and stop the drivers. The drivers themselves obtain configuration data from this file when they are started by upsdrvctl, or when you start them with -a. See nutupsdrv(8) for more information on that. upsd(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 ups.conf called "snoopy", then you can monitor it from upsc(8) or similar as "snoopy@doghouse". Additionally, the first UPS in this file is the default ups in upsd. If you tell one of the clients to monitor a UPS by the hostname alone ("doghouse", without any @ or ups name), it uses the default UPS. If you have multiple UPSes or if you just want to avoid ambiguities, always specify the upsname and hostname with the client software.

SEE ALSO
upsd(8), nutupsdrv(8), upsdrvctl

  Internet resources:
The NUT (Network UPS Tools) home page: http://www.exploits.org/nut/ The user mailing list: ups@lists.exploits.org