NUTUPSDRV(8) | NUT Manual | NUTUPSDRV(8) |
nutupsdrv - generic manual for unified NUT drivers
nutupsdrv -h
nutupsdrv [OPTIONS]
nutupsdrv is not actually a driver. This is a combined man page for the shared code that is the core of many drivers within the Network UPS Tools package.
For information on the specific drivers, see their individual man pages.
UPS drivers provide a communication channel between the physical UPS hardware and the upsd(8) server. The driver is responsible for translating the native protocol of the UPS to the common format used by the rest of this package.
The core has three modes of operation which are determined by the command line switches. In the normal mode, the driver will periodically poll the UPS for its state and parameters, as per the pollinterval parameter in ups.conf(5). The results of this command are presented to upsd. The driver will also handle setting variables and instant commands if available.
In the second mode, using -k, the driver can instruct the UPS to shut down the load, possibly after some delay. This mode of operation is intended for cases when it is known that the UPS is running out of battery power and the systems attached must be turned off to ensure a proper reboot when power returns.
In the third mode, using -d, the driver will exit after some update loops, dumping the data tree (in upsc-like format) to stdout. This can be useful to complement the nut-scanner to discover devices, along with in-depth data.
You probably don’t want to use any of these options directly. You should use upsdrvctl(8) to control your drivers, and ups.conf(5) to configure them. The rest of this manual describes options and parameters that generally are not needed by normal users.
-h
-a id
-s id
-D
The level of debugging needed depends both on the driver and the problem you’re trying to diagnose. Therefore, first explain the problem you have with a driver to a developer/maintainer, before sending them debugging output. More often than not, if you just pick a level, the output may be either too limited or too verbose to be of any use.
-d update_count
-q
The debugging comment above also applies here.
-F
-B
-i interval
-V
-L
-k
You should use upsdrvctl shutdown whenever possible instead of calling this directly.
-r directory
In addition to the state path, many systems will require /dev/null to exist within directory for this to work. The serial ports are opened before the chroot call, so you do not need to create them inside the jail. In fact, it is somewhat safer if you do not.
-u username
When compiling NUT from source, the default username is typically nobody, and this may cause permission errors when the driver opens the UPS device node. You can use this option to temporarily override the defaults. For testing purposes, you can set this option to root to bypass permission errors, especially with USB-based drivers. However, you will want to remove this option later in order to avoid permission conflicts between the driver and the unprivileged copy of upsd(8).
-g groupname
-x var=val
This is like setting var=val in ups.conf(5), but -x overrides any settings from that file.
Information about the startup process is printed to stdout. Additional messages after that point are available in the syslog. After upsd(8) starts, the UPS clients such as upsc(8) can be used to query the status of an UPS.
You should always use upsdrvctl(8) to control the drivers. While drivers can be started by hand for testing purposes, it is not recommended for production use.
ups.conf
NUT_CONFPATH is the path name of the directory that contains upsd.conf and other configuration files. If this variable is not set, upsd uses a built-in default, which is often /usr/local/ups/etc.
NUT_STATEPATH is the path name of the directory in which upsd keeps state information. If this variable is not set, upsd uses a built-in default, which is often /var/state/ups. The STATEPATH directive in upsd.conf(5) overrides this variable.
NUT_ALTPIDPATH is the path name of the directory in which upsd and drivers store .pid files. If this variable is not set, upsd and drivers use either NUT_STATEPATH if set, or ALTPIDPATH if set, or otherwise the built-in default STATEPATH.
Some of the drivers may have bugs. See their manuals for more information.
The NUT (Network UPS Tools) home page: http://www.networkupstools.org/
01/25/2023 | Network UPS Tools 2.8.0 |