nutscan(3)

nutscan3

Network ups tools (nut) device discovery library

Overview

The Network UPS Tools (NUT) nutscan library provides the same discovery related features that are also offered by nut-scanner(8).

It enables the discovery of supported NUT devices (USB, SNMP, Eaton XML/HTTP and IPMI) and NUT servers (either using Avahi, or the classic connection method).

Discovery functions

First, include the required header file:

#include <nut-scan.h>

Then, to discover new devices, use the appropriate function:

• nutscan_scan_usb(3) for supported USB devices,

• nutscan_scan_snmp(3) for supported SNMP agents,

• nutscan_scan_xml_http_range(3) for Eaton Network Management Card,

• nutscan_scan_nut(3) for NUT servers (upsd), using the classic method (search for port),

• nutscan_scan_avahi(3) for NUT servers (upsd), using the mDNS (Avahi) method,

• nutscan_scan_ipmi(3) for supported IPMI PSU.

All of these functions return a list of devices found, using the nutscan_device_t structure. This structure is described in nutscan_add_device_to_device(3).

Helper functions are also provided to output data using standard formats:

• nutscan_display_parsable(3) for parsable output,

• nutscan_display_ups_conf(3) for ups.conf style,

• nutscan_display_ups_conf_with_sanity_check(3) for ups.conf style with comments for warnings about possible configuration problems (if any).

Error handling

There is currently no specific mechanism for error handling.

Releases

8 releases since Debian 7 (Wheezy); the text changed 5 times.

  1. 7
  2. 8
  3. 9–11
  4. 12
  5. 13
  6. Arch

From nut 2.8.5-2 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.