LIBNUTCLIENT_DEVICES(3)

πŸ’– LIBNUTCLIENT_DEVICES πŸ’–

okay so bestie, this is a page from the NUT Manual (that's Network UPS Tools, not the other kind of nut, stay focused πŸ’…). We're in libnutclient_devices territory β€” the device-related functions in the Network UPS Tools high-level client access library. Grab a snack, this one's short and sweet. πŸ“


✨ NAME ✨

libnutclient_devices, nutclient_get_devices, nutclient_has_device, nutclient_get_device_description β€” device related functions in Network UPS Tools high-level client access library 🫢


✨ SYNOPSIS ✨

#include <nutclient.h>

typedef void* NUTCLIENT_t;

typedef char** strarr;

strarr nutclient_get_devices(NUTCLIENT_t client);

int nutclient_has_device(NUTCLIENT_t client, const char* dev);

char* nutclient_get_device_description(NUTCLIENT_t client, const char* dev);

like. the whole squad is right there in the header. iconic. πŸ‘‘


✨ DESCRIPTION ✨

These functions let you manage devices. That's the vibe. That's the whole assignment. 🌸

  • The nutclient_get_devices() function retrieves the list of devices monitored by a client. πŸ“‹
the returned strarr must be freed by strarr_free (peep libnutclient_general(3)) β€” no cap, if you don't free it that memory is just gone, bestie. 😭
  • The nutclient_has_device() function tests if a device is monitored by a client. Like a lil vibe check for devices. βœ…
  • The nutclient_get_device_description() function retrieves the device description. πŸ“
the returned description string must be freed by free(3). yes, this one uses plain free, not strarr_free. they're different, don't @ me, that's just the lore. πŸ’€

πŸŽ€ Common arguments πŸŽ€

  • dev is the device name. 🏷️

✨ SEE ALSO ✨


and that's the whole page, bestie, you ate it fr fr πŸ”₯ go forth and monitor your devices. this was Network UPS Tools 2.8.5, dated 10/07/2026 β€” mwah, sending you the biggest 🫢 πŸ’œ ✨

πŸ“¦ where this page comes from