---
name: "nutscan"
section: "3"
platform: "linux"
package: "nut"
version: "2.8.5-2"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/nutscan"
---

# nutscan(3)

Network UPS Tools (NUT) device discovery library

## NAME

nutscan - Network UPS Tools (NUT) device discovery library

## DESCRIPTION

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

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)](/nutscan_scan_usb/3.md) for supported USB devices,

• [**nutscan\_scan\_snmp**(3)](/nutscan_scan_snmp/3.md) for supported SNMP agents,

• [**nutscan\_scan\_xml\_http\_range**(3)](/nutscan_scan_xml_http_range/3.md) for Eaton Network Management Card,

• [**nutscan\_scan\_nut**(3)](/nutscan_scan_nut/3.md) for NUT servers (upsd), using the classic method (search for port),

• [**nutscan\_scan\_avahi**(3)](/nutscan_scan_avahi/3.md) for NUT servers (upsd), using the mDNS (Avahi) method,

• [**nutscan\_scan\_ipmi**(3)](/nutscan_scan_ipmi/3.md) 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)](/nutscan_add_device_to_device/3.md).

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

• [**nutscan\_display\_parsable**(3)](/nutscan_display_parsable/3.md) for parsable output,

• [**nutscan\_display\_ups\_conf**(3)](/nutscan_display_ups_conf/3.md) for ups.conf style,

• [**nutscan\_display\_ups\_conf\_with\_sanity\_check**(3)](/nutscan_display_ups_conf_with_sanity_check/3.md) 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.

## SEE ALSO

[**nut-scanner**(8)](/nut-scanner/8.md), [**nutscan\_scan\_usb**(3)](/nutscan_scan_usb/3.md), [**nutscan\_scan\_snmp**(3)](/nutscan_scan_snmp/3.md), [**nutscan\_scan\_xml\_http\_range**(3)](/nutscan_scan_xml_http_range/3.md), [**nutscan\_scan\_nut**(3)](/nutscan_scan_nut/3.md), [**nutscan\_scan\_avahi**(3)](/nutscan_scan_avahi/3.md), [**nutscan\_scan\_ipmi**(3)](/nutscan_scan_ipmi/3.md), [**nutscan\_display\_sanity\_check**(3)](/nutscan_display_sanity_check/3.md), [**nutscan\_display\_sanity\_check\_serial**(3)](/nutscan_display_sanity_check_serial/3.md), [**nutscan\_display\_ups\_conf\_with\_sanity\_check**(3)](/nutscan_display_ups_conf_with_sanity_check/3.md), [**nutscan\_display\_parsable**(3)](/nutscan_display_parsable/3.md), [**nutscan\_display\_ups\_conf**(3)](/nutscan_display_ups_conf/3.md), [**nutscan\_new\_device**(3)](/nutscan_new_device/3.md), [**nutscan\_free\_device**(3)](/nutscan_free_device/3.md), [**nutscan\_add\_device\_to\_device**(3)](/nutscan_add_device_to_device/3.md), [**nutscan\_add\_option\_to\_device**(3)](/nutscan_add_option_to_device/3.md), [**nutscan\_init\_ip\_ranges**(3)](/nutscan_init_ip_ranges/3.md), [**nutscan\_free\_ip\_ranges**(3)](/nutscan_free_ip_ranges/3.md), [**nutscan\_add\_ip\_range**(3)](/nutscan_add_ip_range/3.md), [**nutscan\_cidr\_to\_ip**(3)](/nutscan_cidr_to_ip/3.md)

### Internet resources:

http://avahi.org/
