LIBNUTCLIENT_VARIABL(3)
π LIBNUTCLIENT_VARIABL β the NUT Manual, section 3, bestie edition π
okay so. welcome to LIBNUTCLIENT_VARIABL(3), aka the page where we learn how to talk to variables on your devices through the Network UPS Tools high-level client access library. this is giving "let me just peek at what my UPS is up to" energy and honestly? obsessed. π¦
β¨ NAME β¨
libnutclient_variables, nutclient_get_device_variables, nutclient_get_device_rw_variables, nutclient_has_device_variable, nutclient_get_device_variable_description, nutclient_get_device_variable_values, nutclient_set_device_variable_value, nutclient_set_device_variable_values β the variable-related functions in the Network UPS Tools high-level client access library. π
πΈ SYNOPSIS πΈ
like, here's the whole vibe, verbatim:
#include <nutclient.h>
typedef void* NUTCLIENT_t;
typedef char** strarr;
strarr nutclient_get_device_variables(NUTCLIENT_t client,
const char* dev);
strarr nutclient_get_device_rw_variables(NUTCLIENT_t client,
const char* dev);
int nutclient_has_device_variable(NUTCLIENT_t client,
const char* dev, const char* var);
char* nutclient_get_device_variable_description(NUTCLIENT_t client,
const char* dev, const char* var);
strarr nutclient_get_device_variable_values(NUTCLIENT_t client,
const char* dev, const char* var);
void nutclient_set_device_variable_value(NUTCLIENT_t client,
const char* dev, const char* var, const char* value);
void nutclient_set_device_variable_values(NUTCLIENT_t client,
const char* dev, const char* var, const strarr values);
π DESCRIPTION π
so these functions let you manage the variables of devices. that's the whole plot. let's go one by one, no skips, no cap. β¨
nutclient_get_device_variables()β pulls up the list of variable names for a device. π
the strarr it hands back must be freed by strarr_free (peep libnutclient_general(3) for that).
nutclient_get_device_rw_variablesβ same vibe but it gets the list of read-write variable names for a device. the ones you're actually allowed to touch. π
the returned strarr must be freed by strarr_free (see libnutclient_general(3)).
nutclient_has_device_variableβ checks whether the variable you're asking about is even supported by the device. a lil vibe check. π
returns 1 if it's supported and 0 if it's not. simple as that.
nutclient_get_device_variable_descriptionβ grabs the variable's description, if any exists. π
the returned string must be freed by free(3).
nutclient_get_device_variable_valuesβ returns the variable's values (generally there's only one, but bestie, sometimes life surprises you). π«
the returned strarr must be freed by strarr_free (see libnutclient_general(3)).
nutclient_set_device_variable_valueβ intends to set the value of the specified variable. βοΈnutclient_set_device_variable_valuesβ intends to set multiple values of the specified variable. a whole set, together, iconic. π«Ά
π common arguments (iykyk)
devis the device name. π₯οΈvaris the variable name. π·οΈvalueis the variable value. πvaluesis the variable array of values. π§Ί
π₯ SEE ALSO π₯
libnutclient(3) libnutclient_devices(3) libnutclient_general(3)
and that's the whole page, bestie β this was Network UPS Tools 2.8.5, dated 10/07/2026, and that's LIBNUTCLIENT_VARIABL(3), slay, 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