table of contents
UPSDRVCTL(8) | NUT Manual | UPSDRVCTL(8) |
NAME¶
upsdrvctl - UPS driver controller
SYNOPSIS¶
upsdrvctl -h
upsdrvctl [OPTIONS] {start | stop | shutdown} [ups]
upsdrvctl [OPTIONS] -c COMMAND [ups]
DESCRIPTION¶
upsdrvctl provides a uniform interface for controlling your UPS drivers. You should use upsdrvctl instead of direct calls to the drivers whenever possible.
When used properly, upsdrvctl lets you maintain identical startup scripts across multiple systems with different UPS configurations.
Note: For operating systems with service management frameworks, such as Solaris SMF or Linux systemd, the upsdrvsvcctl may be a better choice.
OPTIONS¶
-h
-r directory
This may be set in the ups.conf with "chroot" in the global section.
-t
-u username
If the driver is started as root without specifying this value, it will use the username that was compiled into the binary. This defaults to "nobody", and is far from ideal.
This may be set in ups.conf with "user" in the global section.
-D
-d
-F
-B
COMMANDS¶
upsdrvctl supports three commands - start, stop and shutdown. It also supports passing requests to running drivers using -c COMMAND syntax, similar to that in some other daemons.
They all can take an optional argument which is a UPS name from ups.conf(5). Without that argument, they operate on every UPS that is currently configured.
Note
upsdrvctl can not manage devices not listed in ups.conf (such as test drivers started with -s TMP option).
start
stop
shutdown
Warning
this will probably power off your computers, so don’t play around with this option. Only use it when your systems are prepared to lose power.
Note
refer to ups.conf(5) for using the nowait parameter. It can be overridden by NUT_IGNORE_NOWAIT environment variable (e.g. used to work around certain issues with systemd otherwise).
-c command
dump
reload
reload-or-error
reload-or-exit
If the upsdrvctl was launched to remain in memory and manage NUT driver processes, it can receive supported signals and pass them to those drivers.
ENVIRONMENT VARIABLES¶
NUT_DEBUG_LEVEL sets default debug verbosity if no -D arguments were provided on command line, but does not request that the daemon runs in foreground mode.
NUT_CONFPATH is the path name of the directory that contains ups.conf and other configuration files. If this variable is not set, upsdrvctl (and the drivers) use a built-in default, which is often /usr/local/ups/etc.
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.
DIAGNOSTICS¶
upsdrvctl will return a nonzero exit code if it encounters an error while performing the desired operation. This will also happen if a driver takes longer than the maxstartdelay period to enter the background.
SEE ALSO¶
upsdrvsvcctl(8), nutupsdrv(8), upsd(8), ups.conf(5)
Internet resources:¶
The NUT (Network UPS Tools) home page: https://www.networkupstools.org/
09/10/2024 | Network UPS Tools 2.8.1 |