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

NAME

6       Nodeupdown - Perl API for determining up and down nodes
7

SYNOPSIS

9        use Nodeupdown;
10
11        $obj = Nodeupdown->new([$host, [$port [$timeoutlen]]])
12
13        $upnodes = $obj->up_nodes()
14        @uplist  = $obj->up_nodes()
15
16        $downnodes = $obj->down_nodes()
17        @downlist  = $obj->down_nodes()
18
19        $bool = $obj->are_up(@nodes)
20        $bool = $obj->are_down(@nodes)
21
22        $num = $obj->up_count()
23        $num = $obj->down_count()
24

DESCRIPTION

26       This package provides a Perl API for determining up and down nodes
27
28       Nodeupdown->new([$host, [$port]])
29           Creates and returns a Nodeupdown object.  If the host, port, or
30           timeoutlen, are not specified, default values are assumed.  On
31           error, undef is returned.
32
33       $obj->up_nodes()
34           Return the up nodes in a cluster.  If the context in which the
35           subroutine is invoked is looking for a scalar, a hostlist formatted
36           string of up nodes will be returned.  If the context in which the
37           subroutine is invoked is looking for a list, a list containing each
38           up node will be returned.
39
40       $obj->down_nodes()
41           Return the down nodes in a cluster.  If the context in which the
42           subroutine is invoked is looking for a scalar, a hostlist formatted
43           string of down nodes will be returned.  If the context in which the
44           subroutine is invoked is looking for a list, a list containing each
45           down node will be returned.
46
47       $obj->are_up(@nodes)
48           Returns 1 is all the nodes passed in are determined as up.  Returns
49           0 if any node passed is not up.
50
51       $obj->are_down(@nodes)
52           Returns 1 is all the nodes passed in are determined as down.
53           Returns 0 if any node passed is not down.
54
55       $obj->up_count()
56           Returns the number of up nodes.
57
58       $obj->down_count()
59           Returns the number of down nodes.
60

BUGS

62       Please be careful with the semantics of are_up() and are_down().  Just
63       because a node is not up, does not mean it is down.  For example, if an
64       improper node name is used (e.g. $obj->are_up("foobar"),
65       $obj->are_down("foobar")), both are_up() and are_down() will fail.
66

AUTHOR

68       Albert Chu <chu11@llnl.gov>
69

SEE ALSO

71       libnodeupdown.
72
73       whatsup.
74
75
76
77perl v5.30.0                      2019-07-27                     Nodeupdown(3)
Impressum