ups.conf
UPS definitions for Network UPS Tools
- Provided by: nut-server (Version: 2.7.2-4ubuntu1.2)
- Source: nut
- Report a bug
UPS definitions for Network UPS Tools
This file is read by the driver controller upsdrvctl(8), the UPS drivers that use the common core (see nutupsdrv(8), and upsd(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.
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’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 = blazer_ser
port = /dev/ttyS0
desc = "Web server UPS"
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
desc = "Database server UPS"
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.
chroot
driverpath
maxstartdelay
maxretry
The default is 1 attempt.
retrydelay
The default is 5 seconds.
pollinterval
user
driver
port
sdorder
The default value for this parameter is 0.
desc
nolock
You should only use this if your system won’t work without it.
This may be needed on Mac OS X systems.
ignorelb
battery.charge < battery.charge.low battery.runtime < battery.runtime.low
The idea is to set the battery.charge.low and/or battery.runtime.low levels in ups.conf to a value that gives enough time to cleanly shutdown your system:
override.battery.charge.low = 30 override.battery.runtime.low = 180
In order for this to work, your UPS should be able to (reliably) report charge and/or runtime remaining on battery. Use with caution!
maxstartdelay
The default is 45 seconds.
default.<variable>
default.input.voltage.nominal = 230
The above will report the nominal input voltage to be 230, unless the UPS tells us differently.
override.<variable>
override.battery.voltage.nominal = 12
Use with caution! This will only change the appearance of the variable to the outside world, internally in the UPS the original value is used.
All other fields are passed through to the hardware-specific part of the driver. See those manuals for the list of what is allowed.
upsdrvctl(8) uses this file to start and stop the drivers.
The drivers themselves also obtain configuration data from this file. Each driver looks up its section and uses that to configure itself.
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".
upsd(8), nutupsdrv(8), upsdrvctl(8)
The NUT (Network UPS Tools) home page: http://www.networkupstools.org/