Nodeupdown(3)
π Nodeupdown(3) π
okay so this is the User Contributed Perl Documentation page for Nodeupdown, aka the Perl API for figuring out which nodes are up and which are down. bestie, itβs giving cluster-vibes and weβre obsessed. π
β¨ NAME β¨
Nodeupdown β Perl API for determining up and down nodes. thatβs the whole assignment, no cap. π
π SYNOPSIS π
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. literally the main character of this module. β¨
Nodeupdown->new([$host, [$port]])β creates and returns aNodeupdownobject. Ifhost,port, ortimeoutlenare not specified, default values are assumed. On error,undefis returned. π«Ά$obj->up_nodes()β returns 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. scalar context vs. list context, iykyk. π«$obj->down_nodes()β returns 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. same energy, opposite direction. πΈ$obj->are_up(@nodes)β returns1if all the nodes passed in are determined as up. Returns0if any node passed is not up. π$obj->are_down(@nodes)β returns1if all the nodes passed in are determined as down. Returns0if any node passed is not down. π$obj->up_count()β returns the number of up nodes. simple math, slay. π₯$obj->down_count()β returns the number of down nodes. also simple math, also slay. π₯
π 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. this is the plot twist, bestie. π
For example, if an improper node name is used β like $obj->are_up("foobar"), $obj->are_down("foobar") β both are_up() and are_down() will fail. not me finding out the hard way. π
fr fr: βnot upβ β βdownβ. keep that in your notes. π«Ά
π AUTHOR π
Albert Chu <chu11@llnl.gov> β icon behavior. π
π¦ SEE ALSO π¦
libnodeupdown.whatsup.
go check those out, iykyk. π
mwah π β this page is from perl v5.32.1, dated 2023-01-21. π
π¦ where this page comes from
- epel 9: perl-libnodeupdown 1.14-41.el9 Β· GPLv2+
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms