NODEUPDOWN_LOAD_DATA(3)
β¨ NODEUPDOWN_LOAD_DATA β¨
okay bestie, so this one lives in LIBNODEUPDOWN and it's literally the glow-up moment where your handle finally learns stuff. it's nodeupdown_load_data, and yes it's giving main character energy because without it the rest of the library is just sitting there with nothing to say π«Ά
πΈ NAME πΈ
nodeupdown_load_data β load data. that's it. that's the vibe. she loads the data. π
π SYNOPSIS π
#include <nodeupdown.h>
int nodeupdown_load_data(nodeupdown_t handle, const char *hostname, int
port, int timeout_len, char *module);
π¦ DESCRIPTION π¦
okay so nodeupdown_load_data() pulls data from the nodeupdown backend tool's server, and the whole point is that after you do this, the rest of the nodeupdown library functions can actually do their job and properly return info about which nodes are up and which ones are down. no data loaded = no gossip. periodt.
handle is a nodeupdown handle that you made with nodeupdown_handle_create(3). no handle, no party.
hostname is supposed to tell you where the server is at. but if hostname is NULL, nodeupdown just assumes the backend tool's default server. she's flexible like that β¨
port is the port number of the server. if port is less than or equal to 0, nodeupdown assumes the server is running on the backend tool's default port. math is math.
timeout_len is the timeout length in seconds, and it's what determines if a node is up or down. if timeout_len is less than or equal to 0, nodeupdown assumes the backend tool's default timeout. lowkey generous.
module is optional and you can use it to specify a specific backend module for up-down calculations. if module is NULL, nodeupdown will go find the appropriate module all by herself. independent queen behavior π
real talk though β the default values used innodeupdown_load_data()can get overwritten if a nodeupdown configuration module is found, or if the nodeupdown configuration file is used. seelibnodeupdown(3)andnodeupdown.conf(5)for the deets. and important: the nodeupdown configuration file has precedence over the configuration module. the file wins. iykyk.
π RETURN VALUES π
- on success,
0is returned. slay. - on error,
-1is returned, and an error code is returned inhandle.
the error code can be retrieved via nodeupdown_errnum(3), and a description of the error code can be retrieved via nodeupdown_strerror(3). error codes are defined in nodeupdown.h.
π ERRORS π
not me listing every single one, but bestie we have to, they're all here:
NODEUPDOWN_ERR_NULLHANDLEβ thehandleparameter isNULL. the nodeupdown handle must be created withnodeupdown_handle_create(3). like. you gotta make one first.NODEUPDOWN_ERR_OPENβ a clusterlist database could not be opened.NODEUPDOWN_ERR_CONNECTβ error connecting to server specified byhostnameandgmond_port.NODEUPDOWN_ERR_CONNECT_TIMEOUTβ connection to server timed out. the silence was too loud πNODEUPDOWN_ERR_HOSTNAMEβ incorrect hostname specified byhostname.NODEUPDOWN_ERR_ISLOADEDβnodeupdown_load_data(3)has already been called withhandle. one and done, girl.NODEUPDOWN_ERR_PARAMETERSβ an incorrect parameter has been passed in.NODEUPDOWN_ERR_OUTMEMβmalloc(3)has failed internally.NODEUPDOWN_ERR_BACKEND_MODULEβ internal error with the backend moduleNODEUPDOWN_ERR_CLUSTERLIST_MODULEβ internal error with the clusterlist moduleNODEUPDOWN_ERR_CONFIG_MODULEβ internal error with the config moduleNODEUPDOWN_ERR_CONF_PARSEβ error parsing the nodeupdown conf file.NODEUPDOWN_ERR_CONF_INPUTβ error with input in the nodeupdown conf file.NODEUPDOWN_ERR_CONF_INTERNALβ internal error with the nodeupdown configuration file.NODEUPDOWN_ERR_MAGICβhandlehas an incorrect magic number.handledoes not point to a nodeupdown handle, orhandlehas been destroyed bynodeupdown_handle_destroy(3). bestie that handle is a ghost π»NODEUPDOWN_ERR_INTERNALβ an internal system error has occurred.
π FILES π
/usr/include/nodeupdown.h
π SEE ALSO π
libnodeupdown(3), nodeupdown_handle_create(3), nodeupdown_handle_destroy(3), nodeupdown_errnum(3), nodeupdown_strerror(3), nodeupdown.conf(5)
and that's the whole page, bestie!! this one came from LLNL, dated November 2003 β yeah she's vintage but she ATE and left no crumbs π β¨
π¦ where this page comes from
- epel 9: libnodeupdown-devel 1.14-41.el9 Β· GPLv2+
- fedora 43: libnodeupdown-devel 1.14-50.fc43 Β· GPL-2.0-or-later
- fedora 43: libnodeupdown-devel 1.14-50.fc43 Β· GPL-2.0-or-later
- fedora 44: libnodeupdown-devel 1.14-51.fc44 Β· GPL-2.0-or-later
- fedora 44: libnodeupdown-devel 1.14-51.fc44 Β· GPL-2.0-or-later
- Copyright (C) 2007-2011 Lawrence Livermore National Security, LLC
- Copyright (C) 2003-2007 The Regents of the University of California
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms