1LIBNODEUPDOWN(3)                 LIBNODEUPDOWN                LIBNODEUPDOWN(3)
2
3
4

NAME

6       libnodeupdown  - a library of functions to determine if a node is up or
7       down
8

SYNOPSIS

10       #include <nodeupdown.h>
11
12       nodeupdown_t nodeupdown_handle_create(void);
13
14       int nodeupdown_handle_destroy(nodeupdown_t handle);
15
16       int nodeupdown_load_data(nodeupdown_t handle, const char *hostname, int
17       port, int timeout_len, char *module);
18
19       int nodeupdown_errnum(nodeupdown_t handle);
20
21       char *nodeupdown_strerror(int errnum);
22
23       char *nodeupdown_errormsg(int errnum);
24
25       void nodeupdown_perror(nodeupdown_t handle, const char *msg);
26
27       int  nodeupdown_get_up_nodes_string(nodeupdown_t handle, char *buf, int
28       buflen);
29
30       int nodeupdown_get_down_nodes_string(nodeupdown_t  handle,  char  *buf,
31       int buflen);
32
33       int  nodeupdown_get_up_nodes_list(nodeupdown_t handle, char **list, int
34       len);
35
36       int nodeupdown_get_down_nodes_list(nodeupdown_t  handle,  char  **list,
37       int len);
38
39       int nodeupdown_is_node_up(nodeupdown_t handle, const char *node);
40
41       int nodeupdown_is_node_down(nodeupdown_t handle, const char *node);
42
43       int nodeupdown_up_count(nodeupdown_t handle);
44
45       int nodeupdown_down_count(nodeupdown_t handle);
46
47       int  nodeupdown_last_up_time(nodeupdown_t  handle,  const  char  *node,
48       unsigned int *last_up_time);
49
50       int nodeupdown_nodelist_create(nodeupdown_t handle, char ***list);
51
52       int nodeupdown_nodelist_clear(nodeupdown_t handle, char **list);
53
54       int nodeupdown_nodelist_destroy(nodeupdown_t handle, char **list);
55

DESCRIPTION

57       The nodeupdown library functions are a set of functions that  interacts
58       with  a particular backend tool and a clusterlist database to determine
59       if the nodes of a cluster are up or down.   See  below  for  additional
60       information  on  backend modules and clusterlist modules to learn about
61       which backend tool and clusterlist database format is used.
62
63       For API information, please see the individual manpages for each of the
64       functions  above,  or read the comments written in /usr/include/nodeup‐
65       down.h.  Please see  the  nodeupdown.conf(5)  manpage  for  information
66       about the nodeupdown configuration file.
67
68

BACKEND MODULES

70       The  nodeupdown library loads a backend module, which uses a particular
71       backend tool, to gather up/down info for the  nodeupdown  library.   By
72       default,  the following backend tools are searched for by nodeupdown in
73       the following order:
74
75       cerebro - See http://cerebro.sourceforge.net for more information.
76
77       ganglia - See http://ganglia.sourceforge.net for more information.
78
79       pingd - Simple pingd daemon.  See pingd(8)
80
81       openib - See http://openib.org/
82
83       If none of the above are found, the nodeupdown library will search  for
84       a backend module in /usr/lib64/nodeupdown until one is found.
85
86

CLUSTERLIST MODULES

88       The  nodeupdown  library loads a clusterlist module to obtain a list of
89       all cluster nodes.  There are several possible clusterlist formats that
90       can  be  parsed.   By  default,  the  following clusterlist modules are
91       searched for by nodeupdown in the following order:
92
93       genders - Uses a genders database and the genders library to  determine
94       all nodes in the cluster.  See http://genders.sourceforge.net.
95
96       hostsfile  -  Uses  a file that lists the hostname of every node in the
97       cluster on a separate line.  The default hostsfile is /etc/hostsfile.
98
99       If none of the above are found, the nodeupdown library will search  for
100       a  clusterlist  module  in /usr/lib64/nodeupdown.  If none are found, a
101       default behavior will be implemented by the nodeupdown library.
102
103

CONFIG MODULES

105       The nodeupdown library optionally loads a configuration  module,  which
106       can   be   used   to   define   the  default  values  used  in  nodeup‐
107       down_load_data(3).  The configuration module is primarily used for ease
108       of  configuring  a large cluster of nodes, rather than writing and dis‐
109       tributing  multiple  configuration  files  throughout  a  cluster.   By
110       default,  the following configuration modules are searched for by node‐
111       updown in the following order:
112
113       None built by default
114
115       If none of the above are found, the nodeupdown library will search  for
116       a config module in /usr/lib64/nodeupdown.  The nodeupdown configuration
117       file takes precedence over the configuration module.  When neither  are
118       in use, defaults are supplied by the backend tool.
119
120

FILES

122       /usr/include/nodeupdown.h
123

SEE ALSO

125       nodeupdown_handle_create(3),  nodeupdown_load_data(3),  nodeupdown_han‐
126       dle_destroy(3), nodeupdown_errnum(3),  nodeupdown_strerror(3),  nodeup‐
127       down_errormsg(3),             nodeupdown_perror(3),             nodeup‐
128       down_get_up_nodes_string(3), nodeupdown_get_down_nodes_string(3), node‐
129       updown_get_up_nodes_list(3), nodeupdown_get_down_nodes_list(3), nodeup‐
130       down_is_node_up(3), nodeupdown_is_node_down(3), nodeupdown_up_count(3),
131       nodeupdown_down_count(3),      nodeupdown_last_up_time(3),      nodeup‐
132       down_nodelist_create(3),     nodeupdown_nodelist_clear(3),      nodeup‐
133       down_nodelist_destroy(3), nodeupdown.conf(5)
134
135
136
137LLNL                              August 2003                 LIBNODEUPDOWN(3)
Impressum