UPSDRVCTL(8)
π UPSDRVCTL π
okay bestie, gather round, because this is the NUT Manual page for upsdrvctl and it's literally the driver-wrangler of the whole Network UPS Tools operation π
β¨ NAME β¨
upsdrvctl β Network UPS Tools driver controller π
πΈ SYNOPSIS πΈ
upsdrvctl -h
upsdrvctl [OPTIONS] {start | stop | shutdown | status} [ups]
upsdrvctl [OPTIONS] {list | -l} [ups]
upsdrvctl [OPTIONS] -c COMMAND [ups]
π¦ DESCRIPTION π¦
So upsdrvctl is your one-stop uniform interface for controlling all your UPS drivers π. Like, whenever it's possible, you should be running upsdrvctl instead of calling the drivers directly. fr fr, it's the move.
When you use it the right way, upsdrvctl lets you keep identical startup scripts across multiple systems even when the UPS configurations are totally different. main character energy, honestly π.
β οΈ Warning β οΈ For operating systems that have service management frameworks β think Solaris/illumos SMF or Linux systemd βupsdrvsvcctl(8)might be a better choice. Just saying π In fact, service instances prepared bynut-driver-enumerator(8)based on contents of yourups.conf(5)file, and automatically maintained by the respective framework, can conflict with manually executing drivers. In that case,upsdrvctlwould emit a warning in NUT builds with that capability (and you can silence it by exporting aNUT_QUIET_INIT_NDE_WARNINGenvironment variable with any value). π€«
Also bestie, you might be required to stop service units (if you're using them) and run driver programs directly rather than via upsdrvctl for troubleshooting β e.g. to facilitate debug log collection π, or to test any custom builds of drivers without conflicting with a normally running packaged instance. iykyk.
π OPTIONS π
-hβ Display the help text. That's it, that's the whole vibe π«Ά-rdirectory β If starting a driver, this value will direct it tochroot(2)into directory. This can be super useful when securing systems π.
This may be set in the ups.conf(5) with the chroot directive in the global section.
-tβ Enable testing mode. This also enables debug mode. Testing mode makesupsdrvctldisplay the actions it would execute without actually doing them π. Use this to test out your configuration without actually doing anything to your UPS drivers. No cap, it's the safe way to peek.
This may be helpful when defining the sdorder directive in your ups.conf(5) section for the device.
-uusername β If starting a driver, this value will direct it tosetuid(2)to the user id associated with 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 (if not otherwise configured), which is far from ideal π.
This may be set in ups.conf(5) with the user directive in the global section.
-Dβ Raise the debug level. Use this multiple times for additional details π. Alternatively the value can be set viadebug_minin global section ofups.conf(5). Note the global setting applies to both the tool and a started driver; but another line in a driver's individual section can override that with a larger or smaller value (including adebug_min=0to disable tracing the driver by default).
Note that this does not preclude the upsdrvctl tool from exiting after its job is done (however an explicit -F option does).
Also note that this option alone modifies the debug verbosity of the tool, but not of the drivers it launches. See the additional -d option for that π
-dβ Pass the selected debug level fromupsdrvctlto launched drivers π.
Note that by default for NUT daemons, enabled debugging means running in foreground mode; you can specify -B additionally to avoid that.
-Fβ Driver will run in the foreground (not fork away from theupsdrvctlprocess), regardless of debugging settings. It would also keep the tool program itself foregrounded with driver daemons running as its children (in case of a single driver startup, it would not even fork πΆ).
It would also not wait for drivers to complete initialization, so upsdrvctl will warn about such situations β οΈ.
Specify twice (-FF or -F -F) to save the driver PID file even in this mode (not saved by default when staying in foreground).
-Bβ Drivers will run in the background, regardless of debugging settings, as set by-Dand passed-through by-doptions π.-lβ Alias forlistcommand. cute and short π
π COMMANDS π
upsdrvctl supports three active commands β start, stop and shutdown. It also supports passing requests to running drivers using -c COMMAND syntax, similar to that in some other daemons. A couple of helper commands are also available β list and status π.
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. slay, bulk mode πͺ
π Noteupsdrvctlcan not manage devices not listed inups.conf(such as test drivers started with-s TMPoption). Sorry bestie, no exceptions π«
π start
Start the UPS driver(s). In case of failure to start within maxstartdelay time-frame, further attempts may be executed by using the maxretry and retrydelay values. Conversely, the nowait global option can be used, especially to speed up parallel start of many drivers β‘.
See ups.conf(5) about these options. Built-in defaults are: maxstartdelay=75 (sec), maxretry=1 (meaning one attempt at starting), retrydelay=5 (sec).
π stop
Stop the UPS driver(s). This does not send commands to the UPS. Just, like, the local process situation π€
π shutdown
Command the UPS driver(s) to run their shutdown sequence. This assumes that the driver is no longer running, and starts a fresh instance via drivername -k. It is intended to be used as the last step in system shutdown, after the filesystems are no longer mounted rw. Drivers are stopped according to their sdorder value β see ups.conf(5).
β οΈ 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. like, seriously, this is not a drill π³
π Note Refer toups.conf(5)for using thenowaitparameter. It can be overridden byNUT_IGNORE_NOWAITenvironment variable (e.g. used to work around certain issues with systemd otherwise).
π list
Without a further argument, report all currently known device configuration names to stdout, one per line π. With an argument, also try to report that name, but exit with an error code if that name is not known.
π Note The tool would exit with an error if ups.conf file is not found, readable, or does not define any device sections (whose names are reported here and managed in other commands).
π Note The tool name and NUT version banner line is also printed to stdout before any other processing. This can be suppressed byNUT_QUIET_INIT_BANNERenvironment variable (exported by caller and empty or"true"):
:; NUT_QUIET_INIT_BANNER=true upsdrvctl list
dummy
UPS1
UPS2
π status
Similar to list, but reports more information β also the driver name, the PID if it is running, and result of a signal probe to check it is responding π. The NUT_QUIET_INIT_BANNER suppression can be helpful for scripted parsing. If there is anything to print (at least one device is known), the first line of status report would be the heading with column names:
:; NUT_QUIET_INIT_BANNER=true upsdrvctl status
UPSNAME UPSDRV RUNNING PF_PID S_RESPONSIVE S_PID S_STATUS
dummy dummy-ups N/A -3 NOT_RESPONSIVE N/A
eco650 usbhid-ups RUNNING 3559207 RESPONSIVE 3559207 "OL"
UPS2 dummy-ups RUNNING 31455 RESPONSIVE 31455 "OL BOOST"
Values are TAB-separated, but UPSNAME and UPSDRV may be padded by spaces on the right and on the left respectively. Any complex string values would be encased in double-quotes.
Fields reported (PF_* = according to PID file, if any; S_* = via socket protocol):
UPSNAMEβ driver section configuration nameUPSDRVβ driver program name perups.confRUNNINGβRUNNINGifPF_PIDorS_PIDis valid,STOPPEDif at least one PID value was parsed but none was found running with a correct program name;N/Aif no PID file/socket reply or failed to parse. First the PID file is consulted, but it may be absent either due to command-line parameters of daemons, or due to platform (WIN32). If no PID value was found and confirmed this way, we fall back to checking the PID reported via protocol (if available and different).PF_PIDβ PID of driver according to PID file (if any), or some negative values upon errors (as defined incommon.c) including an absent PID file, invalid contents, or unsupported platform for this mechanism (e.g. WIN32)S_RESPONSIVEβRESPONSIVEif PING/PONG during socket protocol session setup succeeded;NOT_RESPONSIVEotherwiseS_PIDβ PID of driver according toGETPIDactive query, orN/Aif the query failedS_STATUSβ Quoted value ofups.statusvariable
This mode does not discover drivers that are not in ups.conf (e.g. started manually for experiments with many -x CLI options). π
π -c command
Send command to the background process as a signal. Valid commands are:
dumpβ tell the driver(s) to dump currently known state information to their stdout (if attached anywhere) ποΈreloadβ reread configuration files, ignoring modified settings which can not be applied "on the fly" πreload-or-errorβ reread configuration files, ignoring but counting changed values which require a driver restart (can not be changed on the fly), and return a success/fail code based on that count, so the caller can decide the fate of the currently running driver instance βοΈreload-or-exitβ reread configuration files, exiting the old driver process if it encounters modified settings which can not be applied "on the fly" (so caller like systemd can launch another copy of the driver) πͺexitβ tell the currently running driver instance to just exit (so an external caller like the new driver instance, or the systemd or SMF frameworks would start another copy) π
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 π
okay bestie, these are the little environment gremlins that quietly change how upsdrvctl behaves before you even type anything. set them in your shell, in a service file, wherever β they're just vibes you hand over at runtime π
NUT_DEBUG_LEVELβ this one sets the default debug verbosity, but only if you didn't pass any-Darguments on the command line. and no, babes, it does not make the daemon run in foreground mode β that's a whole separate thing, don't get it twisted πNUT_CONFPATHβ the path name of the directory that holdsups.confand all the other config files. if you don't set it,upsdrvctl(and the drivers, they're in on it too) fall back to a built-in default, which is often/usr/local/ups/etc. iconic default behavior, honestly β¨NUT_ALTPIDPATHβ the path name of the directory whereupsdand the drivers stash their.pidfiles. if it's not set,upsdand the drivers go hunting: they useNUT_STATEPATHif that's set, orALTPIDPATHif that's set, or otherwise the built-in defaultSTATEPATH. it's giving backup plan energy, and we love a fallback chain π
π DIAGNOSTICS π
so here's the vibe check on failure: upsdrvctl will return a nonzero exit code if it hits an error while doing whatever you asked it to do. no cap.
and it'll also throw that nonzero exit code if a driver takes longer than the maxstartdelay period to enter the background. so if your driver is out here taking its sweet time, bestie, that's a fail and the exit code will absolutely tell on it π
π¦ SEE ALSO π¦
go read these when you're done here, they're all part of the same friendship group:
Internet resources: π
the NUT (Network UPS Tools) home page, aka the mothership:
https://www.networkupstools.org/historic/v2.8.5/
and that's the whole page, bestie!! π this was Network UPS Tools 2.8.5, dated 10/07/2026, filed under UPSDRVCTL(8). go forth and control those drivers, you absolute icon πβ¨π«Ά
π¦ where this page comes from
- fedora 43: nut 2.8.5-9.fc43 Β· GPL-2.0-or-later AND GPL-3.0-or-later
- fedora 43: nut 2.8.5-9.fc43 Β· GPL-2.0-or-later AND GPL-3.0-or-later
- fedora 44: nut 2.8.5-9.fc44 Β· GPL-2.0-or-later AND GPL-3.0-or-later
- fedora 44: nut 2.8.5-9.fc44 Β· GPL-2.0-or-later AND GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms