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
You must define the
driver = fentonups port = /dev/ttyS0
driver = apcsmart port = /dev/cua00 cable = 940-0095B sdtype = 2
In this case, the apcsmart(8) driver will receive variables called __
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.
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.
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
The default value for this parameter is 0.
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.
You should only use this if your system won't work without it.
Note to FreeBSD users: all new style drivers (i.e. drivers that support ups.conf) now automatically disable locking during shutdown (-k). This means you can use the shutdown routines even when your filesystems are mounted read-only.
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.
The default is 45 seconds.
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.
The NUT (Network UPS Tools) home page: http://www.exploits.org/nut/