Libnodeupdown(3)
π NAME π
okay so this is Libnodeupdown β it's the Perl extension for libnodeupdown, and yes bestie you are literally reading the Libnodeupdown(3) page right now π«Ά
β¨ SYNOPSIS β¨
here's the whole vibe, copy-paste ready π
use Libnodeupdown;
Libnodeupdown::NODEUPDOWN_ERR_SUCCESS
Libnodeupdown::NODEUPDOWN_ERR_NULLHANDLE
Libnodeupdown::NODEUPDOWN_ERR_CONNECT
Libnodeupdown::NODEUPDOWN_ERR_CONNECT_TIMEOUT
Libnodeupdown::NODEUPDOWN_ERR_HOSTNAME
Libnodeupdown::NODEUPDOWN_ERR_ISLOADED
Libnodeupdown::NODEUPDOWN_ERR_NOTLOADED
Libnodeupdown::NODEUPDOWN_ERR_OVERFLOW
Libnodeupdown::NODEUPDOWN_ERR_PARAMETERS
Libnodeupdown::NODEUPDOWN_ERR_NULLPTR
Libnodeupdown::NODEUPDOWN_ERR_OUTMEM
Libnodeupdown::NODEUPDOWN_ERR_NOTFOUND
Libnodeupdown::NODEUPDOWN_ERR_BACKEND_MODULE
Libnodeupdown::NODEUPDOWN_ERR_CLUSTERLIST_MODULE
Libnodeupdown::NODEUPDOWN_ERR_CONFIG_MODULE
Libnodeupdown::NODEUPDOWN_ERR_CONF_PARSE
Libnodeupdown::NODEUPDOWN_ERR_CONF_INPUT
Libnodeupdown::NODEUPDOWN_ERR_CONF_INTERNAL
Libnodeupdown::NODEUPDOWN_ERR_MAGIC
Libnodeupdown::NODEUPDOWN_ERR_INTERNAL
Libnodeupdown::NODEUPDOWN_ERR_ERRNUMRANGE
$handle = Libnodeupdown->nodeupdown_handle_create();
$handle->nodeupdown_load_data();
$handle->nodeupdown_load_data($hostname,
$port,
$timeout_len,
$reserved);
$handle->nodeupdown_errnum()
$handle->nodeupdown_strerror($errnum)
$handle->nodeupdown_errormsg()
$handle->nodeupdown_perror($msg)
$handle->nodeupdown_get_up_nodes_string();
$handle->nodeupdown_get_down_nodes_string();
$handle->nodeupdown_get_up_nodes_list();
$handle->nodeupdown_get_down_nodes_list();
$handle->nodeupdown_is_node_up($node);
$handle->nodeupdown_is_node_down($node);
$handle->nodeupdown_up_count();
$handle->nodeupdown_down_count();
πΈ DESCRIPTION πΈ
so this package hands you an OO Perl interface to the nodeupdown C API (peep libnodeupdown(3) for that one). The Perl side is similar to the C nodeupdown API β key word similar, because there are some necessary changes since C and Perl are, like, fundamentally different creatures π. Read the instructions below so you actually know how to use the Libnodeupdown package, bestie. No skipping π
π Initialization
Libnodeupdown->nodeupdown_handle_createβ returns a nodeupdown object when it slays β¨, andundefon error.$handle->nodeupdown_load_data()$handle->nodeupdown_load_data($hostname, $port, $timeout_len, $reserved)β loads the data that the rest of the nodeupdown library is gonna use. Want defaults? Pass inundeffor any of those parameters. Want all the defaults? Just callnodeupdown_load_datawith no parameters at all, iconic. Returns0on success,-1on error.
π Error Messages π
same energy as the C API: an error code gets stored in the nodeupdown object the moment an error happens. These are the ones you call to grab that error code and get the info out π
$handle->nodeupdown_errnum()β returns the error code that was set most recently.$handle->nodeupdown_strerror($errnum)β returns a string describing the error code$errnum.$handle->nodeupdown_errormsg()β returns a string describing the most recent error.$handle->nodeupdown_perror([$msg])β spits out$msgplus a string describing the most recent error, both to standard error. If$msgisn't specified, only the description of the most recent error goes out to standard error.
π¦ Data Functions π¦
$handle->nodeupdown_get_up_nodes_string()β returns a ranged string of nodes that are up. Returnsundefon error.$handle->nodeupdown_get_down_nodes_string()β returns a ranged string of nodes that are down. Returnsundefon error.$handle->nodeupdown_get_up_nodes_list()β returns a list of nodes that are up. Returnsundefon error.$handle->nodeupdown_get_down_nodes_list()β returns a list of nodes that are up. Returnsundefon error. π (bestie the page literally says "up" here β not me, I'm just the messenger, no cap.)$handle->nodeupdown_is_node_up($node)β returns1if the specified node is up,0if it's not,-1on error.$handle->nodeupdown_is_node_down($node)β returns1if the specified node is down,0if it's not,-1on error.$handle->nodeupdown_up_count()β returns the number of up nodes,-1on error.$handle->nodeupdown_down_count()β returns the number of down nodes,-1on error.
π Error Codes/Constants π
the exact same error codes and constants that live in /usr/include/nodeupdown.h are accessible through these, periodt:
Libnodeupdown::NODEUPDOWN_ERR_SUCCESS
Libnodeupdown::NODEUPDOWN_ERR_NULLHANDLE
Libnodeupdown::NODEUPDOWN_ERR_CONNECT
Libnodeupdown::NODEUPDOWN_ERR_CONNECT_TIMEOUT
Libnodeupdown::NODEUPDOWN_ERR_HOSTNAME
Libnodeupdown::NODEUPDOWN_ERR_ISLOADED
Libnodeupdown::NODEUPDOWN_ERR_NOTLOADED
Libnodeupdown::NODEUPDOWN_ERR_OVERFLOW
Libnodeupdown::NODEUPDOWN_ERR_PARAMETERS
Libnodeupdown::NODEUPDOWN_ERR_NULLPTR
Libnodeupdown::NODEUPDOWN_ERR_OUTMEM
Libnodeupdown::NODEUPDOWN_ERR_NOTFOUND
Libnodeupdown::NODEUPDOWN_ERR_BACKEND_MODULE
Libnodeupdown::NODEUPDOWN_ERR_CLUSTERLIST_MODULE
Libnodeupdown::NODEUPDOWN_ERR_CONFIG_MODULE
Libnodeupdown::NODEUPDOWN_ERR_CONF_PARSE
Libnodeupdown::NODEUPDOWN_ERR_CONF_INPUT
Libnodeupdown::NODEUPDOWN_ERR_CONF_INTERNAL
Libnodeupdown::NODEUPDOWN_ERR_MAGIC
Libnodeupdown::NODEUPDOWN_ERR_INTERNAL
Libnodeupdown::NODEUPDOWN_ERR_ERRNUMRANGE
β AUTHOR β
shoutout to Albert Chu <chu11@llnl.gov> β the main character who made this happen π
π SEE ALSO π
libnodeupdownβ go read that one too, iykyk π
okay that's the whole page bestie, go forth and query nodes πΈπ
β this little number was brought to you by perl v5.32.1, dated 2023-01-21, and it lives its life as Libnodeupdown(3) πβ¨π«Ά
π¦ where this page comes from
- epel 9: perl-libnodeupdown 1.14-41.el9 Β· GPLv2+
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms