libnodeupdown man page

libnodeupdown — a library of functions to determine if a node is up or down

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);

Description

The nodeupdown library functions are a set of functions that interacts with a particular backend tool and a clusterlist database to determine if the nodes of a cluster are up or down. See below for additional information on backend modules and clusterlist modules to learn about which backend tool and clusterlist database format is used.

For API information, please see the individual manpages for each of the functions above, or read the comments written in /usr/include/nodeupdown.h. Please see the nodeupdown.conf(5) manpage for information about the nodeupdown configuration file.

Backend Modules

The nodeupdown library loads a backend module, which uses a particular backend tool, to gather up/down info for the nodeupdown library. By default, the following backend tools are searched for by nodeupdown in the following order:

cerebro - See http://cerebro.sourceforge.net for more information.

ganglia - See http://ganglia.sourceforge.net for more information.

pingd - Simple pingd daemon. See pingd(8)

openib - See http://openib.org/

If none of the above are found, the nodeupdown library will search for a backend module in /usr/lib64/nodeupdown until one is found.

Clusterlist Modules

The nodeupdown library loads a clusterlist module to obtain a list of all cluster nodes. There are several possible clusterlist formats that can be parsed. By default, the following clusterlist modules are searched for by nodeupdown in the following 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 on a separate line. The default hostsfile is /etc/hostsfile.

If none of the above are found, the nodeupdown library will search for a clusterlist module in /usr/lib64/nodeupdown. If none are found, a default behavior will be implemented by the nodeupdown library.

Config Modules

The nodeupdown library optionally loads a configuration module, which can be used to define the default values used in nodeupdown_load_data(3). The configuration module is primarily used for ease of configuring a large cluster of nodes, rather than writing and distributing multiple configuration files throughout a cluster. By default, the following configuration modules are searched for by nodeupdown in the following order:

None built by default

If none of the above are found, the nodeupdown library will search for a config module in /usr/lib64/nodeupdown. The nodeupdown configuration file takes precedence over the configuration module. When neither are in use, defaults are supplied by the backend tool.

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)

Referenced By

nodeupdown.conf(5), nodeupdown_get_up_nodes_list(3), nodeupdown_get_up_nodes_string(3), nodeupdown_handle_destroy(3), nodeupdown_is_node_up(3), nodeupdown_last_up_time(3), nodeupdown_load_data(3), nodeupdown_module(3), nodeupdown_nodelist_create(3), nodeupdown_up_count(3), whatsup(1).

nodeupdown(3) is an alias of libnodeupdown(3).

August 2003 LLNL LIBNODEUPDOWN