NODEUPDOWN_IS_NODE_UP(3)

πŸ“¦ version 1.14, in epel 9, fedora 43, fedora 44

πŸ’– NODEUPDOWN_IS_NODE_UP(3) πŸ’–

okay bestie, welcome to the LIBNODEUPDOWN corner of the manual, section 3, and today's main character is nodeupdown_is_node_up πŸ¦‹ (and its ride-or-die twin nodeupdown_is_node_down, we don't leave her out).


✨ NAME ✨

nodeupdown_is_node_up, nodeupdown_is_node_down β€” test if a node is up or 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. ✨

nodeupdown_is_node_down() tests if the node pointed to by node is down. πŸ’€

the way that this one matters: the node name you pass into these functions must be the shortened name of the hostname. not the long one. the short one. periodt.

πŸ”₯ RETURN VALUES πŸ”₯

For nodeupdown_is_node_up(), 1 is returned if the node is up, 0 is returned if the node is down. For nodeupdown_is_node_down(), 1 is returned if the node is down, 0 is returned if the node is up. yes bestie, they're mirror images, it's giving opposites-attract πŸ’…

On error, both return -1, and an error code is returned in handle. You can pull that error code with nodeupdown_errnum(3), and a description of it with nodeupdown_strerror(3). The error codes themselves live in nodeupdown.h.


😭 ERRORS 😭

  • NODEUPDOWN_ERR_NULLHANDLE β€” the handle parameter is NULL. girl. the nodeupdown handle must be created with nodeupdown_handle_create(3) first, no skipping steps πŸ™ˆ
  • NODEUPDOWN_ERR_NOTLOADED β€” nodeupdown_load_data(3) has not been called and no data has been retrieved. nothing's loaded, so there's nothing to check, we're just vibing in the void 🫠
  • 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 by node is not known. who is she? we don't know her πŸ‘‘
  • NODEUPDOWN_ERR_CLUSTERLIST_MODULE β€” internal error with the clusterlist module
  • NODEUPDOWN_ERR_HOSTLIST β€” Hostlist API has failed internally.
  • NODEUPDOWN_ERR_MAGIC β€” handle has an incorrect magic number. handle does not point to a nodeupdown handle, or handle has been destroyed by nodeupdown_handle_destroy(3). the magic is gone bestie, she's not who she said she was πŸ’€

πŸ“ FILES πŸ“

/usr/include/nodeupdown.h


🧚 SEE ALSO 🧚

libnodeupdown(3), nodeupdown_handle_create(3), nodeupdown_load_data(3), nodeupdown_errnum(3), nodeupdown_strerror(3)


and that's the whole page, no cap πŸ’œ this one came to you from LLNL, back in August 2003, under the LIBNODEUPDOWN umbrella (yes the header says NODEUPDOWN_IS_NODE_UP(3) up top too, we see you). go forth and check your nodes, bestie 🌈⭐

πŸ“¦ where this page comes from