NAME
nut.conf - UPS definitions for Network UPS Tools
NOTE ABOUT HISTORIC NUT RELEASE
Note
|
Two NUT websites
This version of the page reflects NUT release v2.8.1 with codebase commited 4ba352d8f at 2023-10-31T21:46:20+01:00 Options, features and capabilities in current development (and future releases) are detailed on the main site and may differ from ones described here. |
DESCRIPTION
This file attempts to standardize the various files being found in different installations, like /etc/default/nut on Debian based systems and /etc/sysconfig/ups on RedHat based systems.
Distribution’s init script should source this file in order to determine which components have to be started.
Blank lines are ignored. Lines with a hash (#) character at the 1st position of the line are ignored, too. They can be used to add comments.
IMPORTANT NOTE
This file is intended to be sourced by shell scripts. You MUST NOT use spaces around the equal sign!
Refer to the EXAMPLE section for illustrations.
DIRECTIVES
- MODE
-
Required. Recognized values are none, standalone, netserver and netclient. Defaults to none.
- none
-
Indicates that NUT should not get started automatically, possibly because it is not configured or that an Integrated Power Management or some external system, is used to startup the NUT components.
- standalone
-
Addresses a local only configuration, with 1 UPS protecting the local system. This implies to start the 3 NUT layers (driver, upsd and upsmon), with the related configuration files. This mode can also address UPS redundancy.
- netserver
-
Like the standalone configuration, but also possibly need one or more specific LISTEN directive(s) in upsd.conf. Since this MODE is open to the network, a special care should be applied to security concerns.
- netclient
-
When only upsmon is required, possibly because there are other hosts that are more closely attached to the UPS, the MODE should be set to netclient.
- ALLOW_NO_DEVICE
-
Optional, defaults to
false
. Set this totrue
to allow starting theupsd
NUT data server service even ifups.conf
has no device sections configured at the moment. This environment variable overrides the built-in "false" flag value in theupsd
program, and an optional same-named default flag that can be set inupsd.conf
.If you want a data server always running and responding on the network, even if it initially has nothing to serve (may be live-reloaded later, when devices become configured), this option is for you.
- UPSD_OPTIONS
-
Optional. Set upsd specific options. See upsd(8) for more details. It is ignored when MODE above indicates that no upsd should be running.
- UPSMON_OPTIONS
-
Optional. Set upsmon specific options. See upsmon(8) for more details. It is ignored when MODE above indicates that no upsmon should be running.
- POWEROFF_WAIT
-
Optional. At the end of an emergency system halt, the upsmon primary will signal the UPS to switch off. This may fail for a number of reasons. Most notably is the case that mains power returns during the shutdown process. See the section "Power races" in /usr/share/doc/nut/FAQ.txt.gz. The system will wait this long for the UPS to cut power, and then reboot. It should be long enough to exhaust the batteries, in case line power continues to be unavailable. On the other hand, it should not be so long that the system remains offline for an unreasonable amount of time if line power has returned. See sleep(1) for compatible time syntax. If you specify the time in seconds, use the "s" suffix.
Warningthis workaround might be dangerous under some circumstances. Please read http://bugs.debian.org/358696 for more details. - POWEROFF_QUIET
-
Optional, defaults to
false
. This setting controls if the NUT shutdown integration scripts or service units would emit messages about their activity (or lack thereof). By default they may be verbose, to aid in post-mortem troubleshooting via logs or console captures. Set totrue
to avoid that trove of information, if you consider it noise.
EXAMPLE
# /etc/nut/nut.conf. See nut.conf(5)
MODE=none
UPSD_OPTIONS=""
UPSMON_OPTIONS=""
# POWEROFF_WAIT=15m
INTEGRATION
An init script, such as /etc/init.d/nut, is expected to source this file in order to determine which components have to be started.
SEE ALSO
Internet resources:
The NUT (Network UPS Tools) home page: https://www.networkupstools.org/