LIBNUTCLIENT_COMMAND(3)
π NAME π
okay so this page is the whole girlboss squad of instant-command functions in the Network UPS Tools high-level client access library: libnutclient_commands, nutclient_get_device_commands, nutclient_has_device_command, nutclient_get_device_command_description, and nutclient_execute_device_command. they're the ones that handle instant commands. no cap. π
β¨ SYNOPSIS β¨
#include <nutclient.h>
typedef void* NUTCLIENT_t;
typedef char** strarr;
strarr nutclient_get_device_commands(
NUTCLIENT_t client,
const char* dev);
int nutclient_has_device_command(
NUTCLIENT_t client,
const char* dev, const char* cmd);
char* nutclient_get_device_command_description(
NUTCLIENT_t client,
const char* dev, const char* cmd);
void nutclient_execute_device_command(
NUTCLIENT_t client,
const char* dev, const char* cmd,
const char* param="");
π DESCRIPTION π
these functions are literally here so you can manage instant commands of devices. bestie, it's giving remote-control energy for your UPS. π¦
- The
nutclient_get_device_commands()function retrieves the list of command names for a device.
heads up! the returnedstrarrmust be freed bystrarr_free. don't ghost it, free it. π
- The
nutclient_has_device_commandfunction tests if the specified command is supported by the device.
Return 1 if supported and 0 if not. simple as that, it's a vibe check on the command. β
- The
nutclient_get_device_command_descriptionfunction retrieves the command description, if any.
The returned string must be freed by free(3) (see libnutclient_general(3)). yes, with the regular free, not the fancy one. π
- The
nutclient_execute_device_commandintends to execute the instant command, with an optional parameter.
go ahead, press the button, main character energy only. π₯
πΈ Common arguments πΈ
devis the device name.cmdis the instant command name.
π SEE ALSO π
libnutclient(3) libnutclient_devices(3) libnutclient_general(3)
and that's the whole page, bestie π this one's from Network UPS Tools 2.8.5, dated 10/07/2026 β iconic, timeless, periodt. π«Άβ¨π
π¦ where this page comes from
- fedora 43: nut-devel 2.8.5-9.fc43 Β· GPL-2.0-or-later AND GPL-3.0-or-later
- fedora 43: nut-devel 2.8.5-9.fc43 Β· GPL-2.0-or-later AND GPL-3.0-or-later
- fedora 44: nut-devel 2.8.5-9.fc44 Β· GPL-2.0-or-later AND GPL-3.0-or-later
- fedora 44: nut-devel 2.8.5-9.fc44 Β· GPL-2.0-or-later AND GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms