NODEUPDOWN_UP_COUNT(3)

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

✨ NODEUPDOWN_UP_COUNT ✨

okay bestie, welcome to section 3 of the LIBNODEUPDOWN manual πŸ’– this is the page for nodeupdown_up_count (and its partner in crime nodeupdown_down_count) β€” yes it's giving "two functions, one page" energy and honestly? iconic.


🌸 NAME 🌸

nodeupdown_up_count, nodeupdown_down_count β€” literally just return the number of nodes that are up or down 🫢


πŸŽ€ SYNOPSIS πŸŽ€

#include <nodeupdown.h>

int nodeupdown_up_count(nodeupdown_t handle);

int nodeupdown_down_count(nodeupdown_t handle);

πŸ’… DESCRIPTION πŸ’…

so nodeupdown_up_count() returns the number of nodes that are up. that's it. that's the whole vibe. ⭐

and nodeupdown_down_count() returns the number of nodes that are down. bestie they are so symmetrical it hurts πŸ’€


πŸ”₯ RETURN VALUES πŸ”₯

on success, nodeupdown_up_count() and nodeupdown_down_count() will return the number of up or down nodes respectively β€” slay, we love a return value that actually means something 🌈

on error, both return -1, and an error code is returned in handle. the error code can be retrieved via nodeupdown_errnum(3), and a description of the error code can be retrieved via nodeupdown_strerror(3). error codes are defined in nodeupdown.h. no cap. πŸ“–


πŸ’€ ERRORS πŸ’€

not me having to tell you about the ways this can go wrong, but here we are πŸ₯²

  • NODEUPDOWN_ERR_NULLHANDLE β€” the handle parameter is NULL. the nodeupdown handle must be created with nodeupdown_handle_create(3). it cannot be created by manifesting, bestie, you actually have to call the function πŸ™ˆ
  • NODEUPDOWN_ERR_NOTLOADED β€” nodeupdown_load_data(3) has not been called and no data has been retrieved. like, you can't count the vibes if you never checked the vibes, iykyk ✨
  • 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). rip to that handle fr fr πŸͺ¦

πŸ¦‹ FILES πŸ¦‹

  • /usr/include/nodeupdown.h

πŸ‘‘ SEE ALSO πŸ‘‘

libnodeupdown(3), nodeupdown_handle_create(3), nodeupdown_load_data(3), nodeupdown_errnum(3), nodeupdown_strerror(3) β€” go read these too, they're part of the friend group 🌸


and that's the page bestie!! brought to you by LLNL, from way back in September 2003 (yes it predates your entire existence and it still serves πŸ’œ), for the NODEUPDOWN_UP_COUNT(3) page. go forth and count your nodes, you absolute main character πŸŽ€βœ¨

πŸ“¦ where this page comes from