NUT-DRIVER-ENUMERA(8) | NUT Manual | NUT-DRIVER-ENUMERA(8) |
NAME
nut-driver-enumerator - tool to map NUT device entries to service instances
SYNOPSIS
nut-driver-enumerator.sh -h
nut-driver-enumerator.sh (no args)
nut-driver-enumerator.sh [--COMMAND]
DESCRIPTION
nut-driver-enumerator.sh implements the set-up and querying of the mapping between NUT driver configuration sections for each individual monitored device, and the operating system service management framework service instances into which such drivers are wrapped for independent execution and management (on platforms where NUT currently supports this integration — currently this covers Linux distributions with systemd and systems derived from Solaris 10 codebase, including proprietary Sun/Oracle Solaris and numerous open-source illumos distributions with SMF). It may be not installed in packaging for other operating systems.
This script provides a uniform interface for further NUT tools such as upsdrvsvcctl(8) to implement their logic as platform-independently as was possible and practical. It is not currently intended for end-user consumption (and so is located in the libexec directory), with upsdrvsvcctl exposing the most useful data and actions with its list and resync arguments.
One part of the platform complexity that nut-driver-enumerator.sh hides is the difference of rules for valid service instance names in various frameworks, as well as system tools and naming patterns involved.
COMMANDS
nut-driver-enumerator.sh (no args)
nut-driver-enumerator.sh --daemon(=freq)
nut-driver-enumerator.sh --daemon-after(=freq)
nut-driver-enumerator.sh --reconfigure
nut-driver-enumerator.sh --get-service-framework
nut-driver-enumerator.sh --list-devices
nut-driver-enumerator.sh --list-services
nut-driver-enumerator.sh --list-instances
nut-driver-enumerator.sh --get-service-for-device DEV
nut-driver-enumerator.sh --get-device-for-service SVC
nut-driver-enumerator.sh --list-services-for-devices
nut-driver-enumerator.sh --show-all-configs
nut-driver-enumerator.sh --show-device-config DEV
nut-driver-enumerator.sh --show-device-config-value DEV KEY
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.
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.
Other codes can be returned as a result of re-synchronization of mappings:
42
13
1
2
AUTHOR
Jim Klimov <jimklimov+nut@gmail.com>
SEE ALSO
Internet resources:
The NUT (Network UPS Tools) home page: https://www.networkupstools.org/
05/20/2024 | Network UPS Tools 2.8.2 |