1Libnodeupdown(3)      User Contributed Perl Documentation     Libnodeupdown(3)
2
3
4

NAME

6       Libnodeupdown - Perl extension for libnodeupdown
7

SYNOPSIS

9        use Libnodeupdown;
10
11        Libnodeupdown::NODEUPDOWN_ERR_SUCCESS
12        Libnodeupdown::NODEUPDOWN_ERR_NULLHANDLE
13        Libnodeupdown::NODEUPDOWN_ERR_CONNECT
14        Libnodeupdown::NODEUPDOWN_ERR_CONNECT_TIMEOUT
15        Libnodeupdown::NODEUPDOWN_ERR_HOSTNAME
16        Libnodeupdown::NODEUPDOWN_ERR_ISLOADED
17        Libnodeupdown::NODEUPDOWN_ERR_NOTLOADED
18        Libnodeupdown::NODEUPDOWN_ERR_OVERFLOW
19        Libnodeupdown::NODEUPDOWN_ERR_PARAMETERS
20        Libnodeupdown::NODEUPDOWN_ERR_NULLPTR
21        Libnodeupdown::NODEUPDOWN_ERR_OUTMEM
22        Libnodeupdown::NODEUPDOWN_ERR_NOTFOUND
23        Libnodeupdown::NODEUPDOWN_ERR_BACKEND_MODULE
24        Libnodeupdown::NODEUPDOWN_ERR_CLUSTERLIST_MODULE
25        Libnodeupdown::NODEUPDOWN_ERR_CONFIG_MODULE
26        Libnodeupdown::NODEUPDOWN_ERR_CONF_PARSE
27        Libnodeupdown::NODEUPDOWN_ERR_CONF_INPUT
28        Libnodeupdown::NODEUPDOWN_ERR_CONF_INTERNAL
29        Libnodeupdown::NODEUPDOWN_ERR_MAGIC
30        Libnodeupdown::NODEUPDOWN_ERR_INTERNAL
31        Libnodeupdown::NODEUPDOWN_ERR_ERRNUMRANGE
32
33        $handle = Libnodeupdown->nodeupdown_handle_create();
34
35        $handle->nodeupdown_load_data();
36        $handle->nodeupdown_load_data($hostname,
37                                      $port,
38                                      $timeout_len,
39                                      $reserved);
40
41        $handle->nodeupdown_errnum()
42        $handle->nodeupdown_strerror($errnum)
43        $handle->nodeupdown_errormsg()
44        $handle->nodeupdown_perror($msg)
45
46        $handle->nodeupdown_get_up_nodes_string();
47        $handle->nodeupdown_get_down_nodes_string();
48
49        $handle->nodeupdown_get_up_nodes_list();
50        $handle->nodeupdown_get_down_nodes_list();
51
52        $handle->nodeupdown_is_node_up($node);
53        $handle->nodeupdown_is_node_down($node);
54
55        $handle->nodeupdown_up_count();
56        $handle->nodeupdown_down_count();
57

DESCRIPTION

59       This package provides an OO perl interface to the nodeupdown C API (see
60       libnodeupdown(3)).  The perl interface is simliar to the nodeupdown C
61       API, with some necessary changes due to the inherent differences
62       between C and perl.  Please read the instructions below so to
63       understand how to use the Libnodeupdown package.
64
65   Initialization
66       Libnodeupdown->nodeupdown_handle_create
67           Returns a nodeupdown object on success, undef on error.
68
69       $handle->nodeupdown_load_data()
70       $handle->nodeupdown_load_data($hostname, $port, $timeout_len,
71       $reserved)
72           Loads data for the remainder of the nodeupdown library to use.  To
73           use default values, pass in undef for any of the specified
74           parameters.  To use all defaults, simply call nodeupdown_load_data
75           without any parameters.  Returns 0 on success, -1 on error.
76
77   Error Messages
78       Similarly to the C API, an error code is stored in the nodeupdown
79       object after an error has occurred.  The following can be used to
80       retrieve the error code and output information about the error.
81
82       $handle->nodeupdown_errnum()
83           Returns the error code most recently set.
84
85       $handle->nodeupdown_strerror($errnum)
86           Returns a string describing the error code $errnum.
87
88       $handle->nodeupdown_errormsg()
89           Returns a string describing the most recent error.
90
91       $handle->nodeupdown_perror([$msg])
92           Outputs $msg and a string describing the most recent error to
93           standard error.  If $msg is not specified, only a description of
94           the most recent error will be output to standard error.
95
96   Data Functions
97       $handle->nodeupdown_get_up_nodes_string()
98           Returns a ranged string of nodes that are up.  Returns undef on
99           error.
100
101       $handle->nodeupdown_get_down_nodes_string()
102           Returns a ranged string of nodes that are down.  Returns undef on
103           error.
104
105       $handle->nodeupdown_get_up_nodes_list()
106           Returns a list of nodes that are up.  Returns undef on error.
107
108       $handle->nodeupdown_get_down_nodes_list()
109           Returns a list of nodes that are up.  Returns undef on error.
110
111       $handle->nodeupdown_is_node_up($node)
112           Returns 1 if the specified node is up, 0 if not, -1 on error.
113
114       $handle->nodeupdown_is_node_down($node)
115           Returns 1 if the specified node is down, 0 if not, -1 on error.
116
117       $handle->nodeupdown_up_count()
118           Returns the number of up nodes, -1 on error.
119
120       $handle->nodeupdown_down_count()
121           Returns the number of down nodes, -1 on error.
122
123   Error Codes/Constants
124       The same error codes and constants listed in /usr/include/nodeupdown.h
125       can be accessed through the following functions:
126
127        Libnodeupdown::NODEUPDOWN_ERR_SUCCESS
128        Libnodeupdown::NODEUPDOWN_ERR_NULLHANDLE
129        Libnodeupdown::NODEUPDOWN_ERR_CONNECT
130        Libnodeupdown::NODEUPDOWN_ERR_CONNECT_TIMEOUT
131        Libnodeupdown::NODEUPDOWN_ERR_HOSTNAME
132        Libnodeupdown::NODEUPDOWN_ERR_ISLOADED
133        Libnodeupdown::NODEUPDOWN_ERR_NOTLOADED
134        Libnodeupdown::NODEUPDOWN_ERR_OVERFLOW
135        Libnodeupdown::NODEUPDOWN_ERR_PARAMETERS
136        Libnodeupdown::NODEUPDOWN_ERR_NULLPTR
137        Libnodeupdown::NODEUPDOWN_ERR_OUTMEM
138        Libnodeupdown::NODEUPDOWN_ERR_NOTFOUND
139        Libnodeupdown::NODEUPDOWN_ERR_BACKEND_MODULE
140        Libnodeupdown::NODEUPDOWN_ERR_CLUSTERLIST_MODULE
141        Libnodeupdown::NODEUPDOWN_ERR_CONFIG_MODULE
142        Libnodeupdown::NODEUPDOWN_ERR_CONF_PARSE
143        Libnodeupdown::NODEUPDOWN_ERR_CONF_INPUT
144        Libnodeupdown::NODEUPDOWN_ERR_CONF_INTERNAL
145        Libnodeupdown::NODEUPDOWN_ERR_MAGIC
146        Libnodeupdown::NODEUPDOWN_ERR_INTERNAL
147        Libnodeupdown::NODEUPDOWN_ERR_ERRNUMRANGE
148

AUTHOR

150       Albert Chu <chu11@llnl.gov>
151

SEE ALSO

153       libnodeupdown
154
155
156
157perl v5.12.3                      2011-03-07                  Libnodeupdown(3)
Impressum