NUT-SCANNER(8) | NUT Manual | NUT-SCANNER(8) |
NAME
nut-scanner - Tool to scan communication buses for NUT devices
SYNOPSIS
nut-scanner -h
nut-scanner [OPTIONS]
DESCRIPTION
nut-scanner scans available communication buses and displays any NUT-compatible devices it has found.
nut-scanner can also display the detected devices in various formats, including ups.conf, and ensures that the generated devices name are unique across buses.
INSTALLATION
nut-scanner is only built if libltdl (part of libtool development suite) is available.
Available scanning options (USB, SNMP, IPMI, ...) will vary according to the available compile-time and run-time dependencies. For example, if Net-SNMP is installed, thus providing libsnmp libraries (*.so or *.dll) and header files during compilation, and at least the library files on the monitoring system, then SNMP discovery will be available.
OPTIONS
-h
DISPLAY OPTIONS
-Q | --disp_nut_conf_with_sanity_check
-N | --disp_nut_conf
-P | --disp_parsable
BUS OPTIONS
-C | --complete_scan
-U | --usb_scan
This option can be specified several times, for more hardware link-specific details; these can be counter-productive in case of USB enumeration changes over time:
Option count | Practical meaning |
-U | do not report any `bus`/`device`/`busport` details |
-UU | report `bus` and `busport`, if available |
-UUU | report `bus`/`device`/`busport` details |
-UUUU | report `bus`/`device`/`busport` details, and `bcdDevice` (limited use and benefit) |
Note
For reliability, it is preferable to match just by vendor and product identification, and a serial number if available and unique.
-S | --snmp_scan
-M | --xml_scan
-O | --oldnut_scan
-n | --nut_simulation_scan
Warning
The NUT_CONFPATH environment variable override is not currently supported.
-A | --avahi_scan
-I | --ipmi_scan
-E | --eaton_serial serial ports
NETWORK OPTIONS
Note
The networked buses (such as SNMP, NetXML, IPMI and "Old NUT") allow to specify several IP (IPv4 or IPv6) address ranges, down to individual single IP addresses.
Normally a new range is specified by a set of one -s and one -e options following each other (in any order on the command line).
Lone or consecutive -s or -e options present on the command line would translate to single-IP queries.
Also, a -m option squashed between two -s and -e options would be a new range, turning those two into single-IP queries. This feature does not by itself recombine "neighboring" addresses into one range, nor even check for duplicate or overlapping specifications.
A single-address range may be a host name which would be resolved into one IP address by the system resolver. A CIDR using a host name and netmask length would be resolved into an IP address and subjected to the mask application, to query hosts "near" the named one.
Also note that some buses require IP address(es) to scan, and others have a different behavior when exactly no addresses are specified (it is not currently possible to mix the two behaviors in one invocation of the nut-scanner tool).
Finally note that currently even if multi-threaded support is available, each range specification is a separate fan-out of queries constrained by the timeout. Requests to scan many single IP addresses will take a while to complete, much longer than if they were a single range. This will be hopefully fixed in later releases.
Note
Colon-separated IPv6 addresses must be passed in square brackets.
-t | --timeout timeout
-s | --start_ip start IP
-e | --end_ip end IP
-m | --mask_cidr IP address/mask
A special form -m auto allows nut-scanner to detect local IP address(es) and scan corresponding subnet(s) on supported platforms, and -m auto4 or -m auto6 limits the selected addresses to IPv4 and IPv6 respectively. Only the first "auto*" request would be honoured, others ignored with a warning.
An /ADDRLEN suffix can be added to the option, to filter out discovered subnets with too many bits available for the host address part (avoiding millions of scans in the extreme cases). For example, if your IPv4 LAN’s network range is 10.2.3.0/24, its address part is (32-24)=8. Note that while this is applied to IPv6 networks also, their typical /64 subnets are not likely to have a NUT/SNMP/NetXML/... server that close nearby (in addressing terms), for a tight filter to find them. Default is 8.
NUT DEVICE OPTION
-p | --port port number
SNMP V1 OPTION
-c | --community community
SNMP V3 OPTIONS
-l | --secLevel security level
-u | --secName security name
-w | --authProtocol authentication protocol
-W | --authPassword authentication pass phrase
-x | --privProtocol privacy protocol
-X | --privPassword privacy pass phrase
IPMI OPTIONS
-b | --username username
-B | --password password
-d | --authType authentication type
-L | --cipher_suite_id cipher suite identifier
The authentication algorithm identifies the algorithm to use for session setup, the integrity algorithm identifies the algorithm to use for session packet signatures, and the confidentiality algorithm identifies the algorithm to use for payload encryption (default=3).
The following cipher suite ids are currently supported (Authentication; Integrity; Confidentiality):
MISCELLANEOUS OPTIONS
-V | --version
-a | --available
-q | --quiet
-D | --nut_debug_level
Note
The level of debugging needed depends both on nut-scanner and the problem you’re trying to diagnose. Therefore, first explain the problem you have with nut-scanner 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.
EXAMPLES
To scan USB devices only:
:; nut-scanner -U [nutdev-usb1] driver = "snmp-ups" port = "192.168.0.42"
To scan SNMP v1 device with public (default) community on address range 192.168.0.0 to 192.168.0.255:
:; nut-scanner -S -s 192.168.0.0 -e 192.168.0.255 [nutdev-snmp1] driver = "snmp-ups" port = "192.168.0.42"
The same using CIDR notation:
:; nut-scanner -S -m 192.168.0.0/24 [nutdev-snmp1] driver = "snmp-ups" port = "192.168.0.42"
To scan NUT servers with a timeout of 10 seconds on IP range 192.168.0.0 to 192.168.0.127 using CIDR notation:
:; nut-scanner -O -t 10 -m 192.168.0.0/25 [nutdev-nut1] driver = "dummy-ups" port = "dummy-test@192.168.1.28"
To scan for power supplies, through IPMI (1.5 mode) over the network, on address range 192.168.0.0 to 192.168.0.255 using CIDR notation:
:; nut-scanner -I -m 192.168.0.0/24 -b username -B password
To scan for Eaton serial devices on ports 0 and 1 (/dev/ttyS0, /dev/ttyUSB0, /dev/ttyS1 and /dev/ttyUSB1 on Linux):
:; nut-scanner --eaton_serial 0-1
To scan for Eaton serial devices on ports 1 and 2 (COM1 and COM2 on Windows):
:; nut-scanner --eaton_serial 1-2
SEE ALSO
Internet resources:
The NUT (Network UPS Tools) home page: https://www.networkupstools.org/historic/v2.8.3/
05/29/2025 | Network UPS Tools 2.8.3 |