NODEUPDOWN_IS_NODE_UP(3)
β¨ NAME β¨
nodeupdown_is_node_up, nodeupdown_is_node_down β test if a node is up or down
Ok so real quick, this is a page from LIBNODEUPDOWN (yes bestie, the NODEUPDOWN_IS_NODE_UP(3) one) and it's literally just two little functions that answer the most basic question in all of cluster life: is this node up, or is it down? π
π SYNOPSIS π
#include <nodeupdown.h>
int nodeupdown_is_node_up(nodeupdown_t handle, const char *node); q.sp
int nodeupdown_is_node_down(nodeupdown_t handle, const char *node);
π¦ DESCRIPTION π¦
nodeupdown_is_node_up() tests if the node pointed to by node is up. That's it. That's the whole job. β¨
nodeupdown_is_node_down() tests if the node pointed to by node is down. Same energy, opposite direction. π«Ά
Heads up bestie: the node name you pass into these functions must be the shortened name of the hostname. Not the long one, not the FQDN, the short one. Don't be the girl who passes the full hostname and then wonders why nothing works π
πΈ RETURN VALUES πΈ
For nodeupdown_is_node_up():
1gets returned if the node is up π’0gets returned if the node is down π΄
For nodeupdown_is_node_down():
1gets returned if the node is down π΄0gets returned if the node is up π’
On error, both of them return -1, and an error code is returned in handle. You can pull that error code out with nodeupdown_errnum(3), and a whole description of what that error code even means comes from nodeupdown_strerror(3). The error codes themselves live in nodeupdown.h. iykyk π
π₯ ERRORS π₯
NODEUPDOWN_ERR_NULLHANDLEβ thehandleparameter isNULL. The nodeupdown handle must be created withnodeupdown_handle_create(3). like girl you gotta make the handle first πNODEUPDOWN_ERR_NOTLOADEDβnodeupdown_load_data(3)has not been called and no data has been retrieved. no data, no answers, periodt.NODEUPDOWN_ERR_PARAMETERSβ an incorrect parameter has been passed in. πNODEUPDOWN_ERR_OUTMEMβmalloc(3)has failed internally. πNODEUPDOWN_ERR_NOTFOUNDβ the node pointed to bynodeis not known. never heard of her.NODEUPDOWN_ERR_CLUSTERLIST_MODULEβ internal error with the clusterlist moduleNODEUPDOWN_ERR_HOSTLISTβ hostlist API has failed internally.NODEUPDOWN_ERR_MAGICβhandlehas an incorrect magic number.handledoes not point to a nodeupdown handle, orhandlehas been destroyed bynodeupdown_handle_destroy(3). the magic number said no π
π FILES π
/usr/include/nodeupdown.h
π SEE ALSO π
libnodeupdown(3), nodeupdown_handle_create(3), nodeupdown_load_data(3), nodeupdown_errnum(3), nodeupdown_strerror(3)
ok that's the whole page bestie, go forth and check your nodes π
This little masterpiece came from LLNL (LIBNODEUPDOWN), dated August 2003 β yes, it's vintage, and yes, it still ate. π
π¦ where this page comes from
- epel 9: libnodeupdown-devel 1.14-41.el9 Β· GPLv2+
- fedora 43: libnodeupdown-devel 1.14-50.fc43 Β· GPL-2.0-or-later
- fedora 43: libnodeupdown-devel 1.14-50.fc43 Β· GPL-2.0-or-later
- fedora 44: libnodeupdown-devel 1.14-51.fc44 Β· GPL-2.0-or-later
- fedora 44: libnodeupdown-devel 1.14-51.fc44 Β· GPL-2.0-or-later
- Copyright (C) 2007-2011 Lawrence Livermore National Security, LLC
- Copyright (C) 2003-2007 The Regents of the University of California
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms