LIBNODEUPDOWN(3)
π LIBNODEUPDOWN π
okay so bestie, welcome to libnodeupdown(3) β it's a whole library of functions whose entire job is figuring out if a node is up or down. yes, that's it. that's the vibe. cluster gossip, but make it C. β¨
β¨ SYNOPSIS β¨
#include <nodeupdown.h>
nodeupdown_t nodeupdown_handle_create(void);
int nodeupdown_handle_destroy(nodeupdown_t handle);
int nodeupdown_load_data(nodeupdown_t handle, const char *hostname, int port, int timeout_len, char *module);
int nodeupdown_errnum(nodeupdown_t handle);
char *nodeupdown_strerror(int errnum);
char *nodeupdown_errormsg(int errnum);
void nodeupdown_perror(nodeupdown_t handle, const char *msg);
int nodeupdown_get_up_nodes_string(nodeupdown_t handle, char *buf, int buflen);
int nodeupdown_get_down_nodes_string(nodeupdown_t handle, char *buf, int buflen);
int nodeupdown_get_up_nodes_list(nodeupdown_t handle, char **list, int len);
int nodeupdown_get_down_nodes_list(nodeupdown_t handle, char **list, int len);
int nodeupdown_is_node_up(nodeupdown_t handle, const char *node);
int nodeupdown_is_node_down(nodeupdown_t handle, const char *node);
int nodeupdown_up_count(nodeupdown_t handle);
int nodeupdown_down_count(nodeupdown_t handle);
int nodeupdown_last_up_time(nodeupdown_t handle, const char *node, unsigned int *last_up_time);
int nodeupdown_nodelist_create(nodeupdown_t handle, char ***list);
int nodeupdown_nodelist_clear(nodeupdown_t handle, char **list);
int nodeupdown_nodelist_destroy(nodeupdown_t handle, char **list);
like, all of them. no crumbs. π
πΈ DESCRIPTION πΈ
so the nodeupdown library functions are a lil set of functions that talk to a particular backend tool and a clusterlist database to figure out whether the nodes of a cluster are up or down. that's the whole plot. π«Ά
scroll down bestie for the extra tea on backend modules and clusterlist modules β that's where you learn which backend tool and which clusterlist database format actually gets used.
for API deets, go read the individual manpages for each of the functions listed up there β, or honestly just read the comments written in /usr/include/nodeupdown.h β they're right there. and if you want the configuration file lore, that's nodeupdown.conf(5). π
π₯ BACKEND MODULES π₯
the nodeupdown library loads a backend module, which uses a particular backend tool, to gather up/down info for the library. by default, nodeupdown searches for these backend tools in this exact order:
cerebroβ see http://cerebro.sourceforge.net for more infogangliaβ see http://ganglia.sourceforge.net for more infopingdβ simple pingd daemon. seepingd(8)openibβ see http://openib.org/
and if literally none of the above are found? the library keeps hunting for a backend module in /usr/lib64/nodeupdown until one turns up. she's persistent. π
π¦ CLUSTERLIST MODULES π¦
the nodeupdown library also loads a clusterlist module to get a list of all the cluster nodes. there are several possible clusterlist formats it can parse. by default, nodeupdown searches for these clusterlist modules in this order:
gendersβ uses a genders database and the genders library to determine all nodes in the cluster. see http://genders.sourceforge.net.hostsfileβ uses a file that lists the hostname of every node in the cluster, one per line, each on a separate line. the default hostsfile is/etc/hostsfile.
if none of the above are found, the library goes looking for a clusterlist module in /usr/lib64/nodeupdown. and if those aren't found either? the nodeupdown library just implements a default behavior itself. she improvises. β¨
π CONFIG MODULES π
the nodeupdown library optionally loads a configuration module, which can define the default values used in nodeupdown_load_data(3). why? because the config module is primarily there for ease of configuring a large cluster of nodes β way better than writing and distributing multiple configuration files all over the cluster like some kind of gremlin. π
by default, nodeupdown searches for these configuration modules in this order:
- None built by default
if none of the above are found, the library searches for a config module in /usr/lib64/nodeupdown. also important, bestie: the nodeupdown configuration file takes precedence over the configuration module. and when neither one is in use, the defaults are supplied by the backend tool. periodt. π
π FILES π
/usr/include/nodeupdown.h
π SEE ALSO π
nodeupdown_handle_create(3)nodeupdown_load_data(3)nodeupdown_handle_destroy(3)nodeupdown_errnum(3)nodeupdown_strerror(3)nodeupdown_errormsg(3)nodeupdown_perror(3)nodeupdown_get_up_nodes_string(3)nodeupdown_get_down_nodes_string(3)nodeupdown_get_up_nodes_list(3)nodeupdown_get_down_nodes_list(3)nodeupdown_is_node_up(3)nodeupdown_is_node_down(3)nodeupdown_up_count(3)nodeupdown_down_count(3)nodeupdown_last_up_time(3)nodeupdown_nodelist_create(3)nodeupdown_nodelist_clear(3)nodeupdown_nodelist_destroy(3)nodeupdown.conf(5)
okay that's the whole page, you ate that π and before you go β this icon was brought to you by LLNL, dated August 2003, and it's living in the LIBNODEUPDOWN(3) era of the manual. go check your nodes, bestie. π§ββοΈπ
π¦ where this page comes from
- epel 9: libnodeupdown 1.14-41.el9 Β· GPLv2+
- fedora 43: libnodeupdown 1.14-50.fc43 Β· GPL-2.0-or-later
- fedora 44: libnodeupdown 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-1017 on : a language model's rewrite of the original, under its terms