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

NAME

6       nodeupdown_load_data - load data
7

SYNOPSIS

9       #include <nodeupdown.h>
10
11       int nodeupdown_load_data(nodeupdown_t handle, const char *hostname, int
12       port, int timeout_len, char *module);
13

DESCRIPTION

15       nodeupdown_load_data() loads data from the  nodeupdown  backend  tool's
16       server  so that the remaining nodeupdown library functions can properly
17       return information about up and down nodes.
18
19       handle is a nodeupdown handle created by nodeupdown_handle_create(3).
20
21       hostname should indicate the location of the server.   If  hostname  is
22       NULL, nodeupdown assumes the backend tool's default server.
23
24       port  should indicate the port number of the server.  If port less than
25       or equal to 0, nodeupdown assumes the server is running on the  backend
26       tool's default port.
27
28       timeout_len  should  indicate the timeout length in seconds that deter‐
29       mines if a node is up or down.  If timeout_len is less than or equal to
30       0, nodeupdown assumes the backend tool's default timeout.
31
32       module  may  be  used  to specify a specific backend module for up-down
33       calculations.  If module is NULL, nodeupdown will search for the appro‐
34       priate module itself.
35
36       The default values used in nodeupdown_load_data() can be overwritten if
37       a nodeupdown configuration module is found or if the nodeupdown config‐
38       uration  file is used.  See libnodeupdown(3) and nodeupdown.conf(5) for
39       information.  The nodeupdown configuration file has precedence over the
40       configuration module.
41

RETURN VALUES

43       On success, 0 is returned.  On error, -1 is returned, and an error code
44       is returned in handle.  The error code can  be  retrieved  via  nodeup‐
45       down_errnum(3)  ,  and a description of the error code can be retrieved
46       via nodeupdown_strerror(3).  Error codes are defined in nodeupdown.h.
47

ERRORS

49       NODEUPDOWN_ERR_NULLHANDLE
50              The handle parameter is NULL.  The  nodeupdown  handle  must  be
51              created with nodeupdown_handle_create(3).
52
53       NODEUPDOWN_ERR_OPEN
54              A clusterlist database could not be opened.
55
56       NODEUPDOWN_ERR_CONNECT
57              Error connecting to server specified by hostname and gmond_port.
58
59       NODEUPDOWN_ERR_CONNECT_TIMEOUT
60              Connection to server timed out.
61
62       NODEUPDOWN_ERR_HOSTNAME
63              Incorrect hostname specified by hostname.
64
65       NODEUPDOWN_ERR_ISLOADED
66              nodeupdown_load_data(3) has already been called with handle.
67
68       NODEUPDOWN_ERR_PARAMETERS
69              An incorrect parameter has been passed in.
70
71       NODEUPDOWN_ERR_OUTMEM
72              malloc(3) has failed internally.
73
74       NODEUPDOWN_ERR_BACKEND_MODULE
75              Internal error with the backend module
76
77       NODEUPDOWN_ERR_CLUSTERLIST_MODULE
78              Internal error with the clusterlist module
79
80       NODEUPDOWN_ERR_CONFIG_MODULE
81              Internal error with the config module
82
83       NODEUPDOWN_ERR_CONF_PARSE
84              Error parsing the nodeupdown conf file.
85
86       NODEUPDOWN_ERR_CONF_INPUT
87              Error with input in the nodeupdown conf file.
88
89       NODEUPDOWN_ERR_CONF_INTERNAL
90              Internal error with the nodeupdown configuration file.
91
92       NODEUPDOWN_ERR_MAGIC
93              handle  has an incorrect magic number.  handle does not point to
94              a nodeupdown handle or handle  has  been  destroyed  by  nodeup‐
95              down_handle_destroy(3).
96
97       NODEUPDOWN_ERR_INTERNAL
98              An internal system error has occurred.
99

FILES

101       /usr/include/nodeupdown.h
102

SEE ALSO

104       libnodeupdown(3),      nodeupdown_handle_create(3),     nodeupdown_han‐
105       dle_destroy(3), nodeupdown_errnum(3),  nodeupdown_strerror(3),  nodeup‐
106       down.conf(5)
107
108
109
110LLNL                             November 2003         NODEUPDOWN_LOAD_DATA(3)
Impressum