NUT-DRIVER-ENUMERA(8)
π NAME π
nut-driver-enumerator β bestie, it's the tool that maps your NUT device entries to their service instances π like a little matchmaker for your UPS drivers, no cap.
β¨ SYNOPSIS β¨
nut-driver-enumerator.sh -h
nut-driver-enumerator.sh (no args)
nut-driver-enumerator.sh [--COMMAND]
(also affectionately known as NDE, and yes we're all in the NUT-DRIVER-ENUMERA(8) chapter of the NUT Manual, iykyk π
)
πΈ DESCRIPTION πΈ
Okay so. The nut-driver-enumerator.sh script (aka "NDE", iconic nickname) handles the set-up and the querying of the mapping between NUT driver configuration sections β one per individual monitored device β and the service instances of an operating system service management framework. It does this on platforms where NUT already supports this integration, which currently means Linux distributions with systemd and systems derived from the Solaris 10 codebase, so that's proprietary Sun/Oracle Solaris plus a whole bunch of open-source illumos distributions using SMF. That's the framework your drivers get wrapped into so they can run and be managed independently π¦
Heads up bestie: it may be not installed in packaging for other operating systems. Not every OS gets the NDE experience, sadly π
The whole point? With each NUT driver living as its own separate service instance, you can define dependencies on it β like, networked drivers must start after the network ability shows up in the OS, but USB/Serial drivers should not be waiting around for that. And they can fail or be brought into maintenance independently. Contrast that with a monolithic service based on upsdrvctl(8) where literally everything configured has to start. For a few special drivers β dummy-ups(8), clone(8), clone-outlet(8), and failover(8) β this may also involve a dependency between service instances of different NUT drivers themselves. It's giving interconnected, it's giving main character energy π₯
This script provides a uniform interface so further NUT tools like upsdrvsvcctl(8) can implement their logic as platform-independently as was possible and practical. It is not currently intended for end-user consumption (which is why it lives in the libexec directory, shy girl behavior π), with upsdrvsvcctl exposing the most useful data and actions via its list and resync arguments.
One part of the platform complexity that nut-driver-enumerator.sh hides is the difference in rules for valid service instance names across various frameworks, plus the system tools and naming patterns involved. Literally doing the most so you don't have to π
Depending on the platform, the script may also be wrapped by different service unit types to run automatically β e.g. upon system start-up, or regularly to pick up changes of ups.conf(5) soon after it is edited, or integrated with a file system monitor to be triggered when the configuration is changed. Some of these modes make sense for use-cases with a rarely (if ever) changing population of power devices, like a home or small-office UPS monitored the same way for years at a time. Others can help automate a data-center monitoring system where device deployments (or discovery) can be much more dynamic. Different vibes, both valid β¨
π COMMANDS π
nut-driver-enumerator.sh (no args)β Update wrapping of devices into services. The classic, the default, the moment β¨nut-driver-enumerator.sh --daemon(=freq)β Update wrapping of devices into services in an infinite loop. Defaultfreqis60sec. It just keeps going, periodt πnut-driver-enumerator.sh --daemon-after(=freq)β Update wrapping of devices into services in an infinite loop, but first do one run of the loop though, then daemonize. This way the service unit is deemed started only when NUT config and driver instances are in sync. Defaultfreqis60sec. Responsible queen behavior β do the work then chill πnut-driver-enumerator.sh --reconfigureβ Stop and un-register all service instances and recreate them (e.g. if a new dependency template was defined in a new version of the script or package). Glow-up, but for service units πnut-driver-enumerator.sh --get-service-frameworkβ Print the detected service management framework in this OS.nut-driver-enumerator.sh --list-devicesβ Print list of devices in NUT config.nut-driver-enumerator.sh --list-servicesβ Print list of service instances which wrap registered NUT devices (full name of service unit).nut-driver-enumerator.sh --list-instancesβ Print list of service instances which wrap registered NUT devices (just the instance suffix).nut-driver-enumerator.sh --get-service-for-device DEVβ Print the full name of service unit which wraps a NUT device namedDEV.nut-driver-enumerator.sh --get-device-for-service SVCβ Print the NUT device name for the full or instance-suffix name of a service unitSVCwhich wraps it.nut-driver-enumerator.sh --list-services-for-devicesβ Print a TAB-separated list of service units and corresponding NUT device names which each such unit wraps.nut-driver-enumerator.sh --show-all-configsβ Show the complete normalized list of device configuration blocks (same as used later by the parser in the script to make decisions).nut-driver-enumerator.sh --show-device-config DEVβ Show configuration block of the specified NUT device.nut-driver-enumerator.sh --show-device-config-value DEV KEYβ Show single configuration key of the specified NUT device.
π ENVIRONMENT VARIABLES π
By default, nut-driver-enumerator.sh executed without arguments would automatically start any newly registered service instances wrapping the NUT devices, and would also restart the nut-server service if the configuration was changed. Environment variable AUTO_START=no disables this default part of the action. Not me letting you opt out of the auto-starting π
Also see below for environment variable REPORT_RESTART_42=no value π
π DIAGNOSTICS π
nut-driver-enumerator.sh will return a zero exit code if it had nothing to do (all currently defined drivers match all of the currently defined service instances, one-to-one) and if it had no errors in its operation. Peace, quiet, perfection π
Other codes can be returned as a result of re-synchronization of mappings:
42β NUT device sections and system service instances differed before, but now match up β so now the caller should likely restart some services. Note that the drivers' service instances may have been started or stopped as required (byAUTO_START=yes) β but maybe theupsmonorupsschedservices should restart. If you pass environment variableREPORT_RESTART_42=nothen this codepath would return0(as a non-error exit code). In default mode, such non-null reconfiguration should cause thenut-driver-enumeratorservice to restart and this would propagate to other NUT services that depend on it. The answer to everything, honestly π13β Sections and services differed, and still do not match up. Awkward π¬1β Bad inputs, e.g. unrecognized service management framework. Rude.2β Absent or unreadableups.conffile. Can't read the config bestie, we're stuck π
π«Ά AUTHOR π«Ά
Jim Klimov <jimklimov+nut@gmail.com>
π₯ SEE ALSO π₯
π Internet resources:
The NUT (Network UPS Tools) home page: https://www.networkupstools.org/historic/v2.8.5/
okay that's the whole thing, we ate and left no crumbs πβ¨ β this was Network UPS Tools 2.8.5, dated 10/07/2026, and that's your NUT-DRIVER-ENUMERA(8) page, love you, bye ππ
π¦ 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