Rechercher une page de manuel
Nodeupdown.3pm
Langue: en
Version: 2010-06-24 (fedora - 01/12/10)
Section: 3 (Bibliothèques de fonctions)
NAME
Nodeupdown - Perl API for determining up and down nodesSYNOPSIS
use Nodeupdown; $obj = Nodeupdown->new([$host, [$port [$timeoutlen]]]) $upnodes = $obj->up_nodes() @uplist = $obj->up_nodes() $downnodes = $obj->down_nodes() @downlist = $obj->down_nodes() $bool = $obj->are_up(@nodes) $bool = $obj->are_down(@nodes) $num = $obj->up_count() $num = $obj->down_count()
DESCRIPTION
This package provides a Perl API for determining up and down nodes- Nodeupdown->new([$host, [$port]])
- Creates and returns a Nodeupdown object. If the host, port, or timeoutlen, are not specified, default values are assumed. On error, undef is returned.
- $obj->up_nodes()
- Return the up nodes in a cluster. If the context in which the subroutine is invoked is looking for a scalar, a hostlist formatted string of up nodes will be returned. If the context in which the subroutine is invoked is looking for a list, a list containing each up node will be returned.
- $obj->down_nodes()
- Return the down nodes in a cluster. If the context in which the subroutine is invoked is looking for a scalar, a hostlist formatted string of down nodes will be returned. If the context in which the subroutine is invoked is looking for a list, a list containing each down node will be returned.
- $obj->are_up(@nodes)
- Returns 1 is all the nodes passed in are determined as up. Returns 0 if any node passed is not up.
- $obj->are_down(@nodes)
- Returns 1 is all the nodes passed in are determined as down. Returns 0 if any node passed is not down.
- $obj->up_count()
- Returns the number of up nodes.
- $obj->down_count()
- Returns the number of down nodes.
BUGS
Please be careful with the semantics of are_up() and are_down(). Just because a node is not up, does not mean it is down. For example, if an improper node name is used (e.g. $obj->are_up(``foobar''), $obj->are_down(``foobar'')), both are_up() and are_down() will fail.AUTHOR
Albert Chu <chu11@llnl.gov>SEE ALSO
libnodeupdown.whatsup.
Contenus ©2006-2024 Benjamin Poulain
Design ©2006-2024 Maxime Vantorre