NODEUPDOWN_GE..._NODES_STRING(3)

๐Ÿ“ฆ version 1.14, in epel 9, fedora 43, fedora 44

๐Ÿ’– NODEUPDOWN_GET_UP_NODES_STRING ๐Ÿ’–

okay so bestie, welcome to the nodeupdown girlies' corner of LIBNODEUPDOWN ๐Ÿ’… this is the man page for nodeupdown_get_up_nodes_string and its ride-or-die twin nodeupdown_get_down_nodes_string, and no cap, they're about to hand you a whole ranged string of nodes like it's nothing. periodt.


โœจ NAME โœจ

nodeupdown_get_up_nodes_string, nodeupdown_get_down_nodes_string โ€” get up or down nodes ๐Ÿฆ‹


๐ŸŒธ SYNOPSIS ๐ŸŒธ

#include <nodeupdown.h>

int nodeupdown_get_up_nodes_string(nodeupdown_t handle, char *buf, int
buflen);

int nodeupdown_get_down_nodes_string(nodeupdown_t handle, char *buf, int
buflen);

๐Ÿ’œ DESCRIPTION ๐Ÿ’œ

so nodeupdown_get_up_nodes_string() goes and fetches a ranged string of nodes that are up and drops it right into the buffer that buf is pointing at. iconic behaviour honestly.

and buflen? that's you telling it how long your buffer is. pls don't lie to it, it will not recover. ๐Ÿ™ˆ

then nodeupdown_get_down_nodes_string() is literally the exact same function, same energy, same everything โ€” except it retrieves a ranged string of down nodes. that's it. that's the whole difference. slay.


๐ŸŽ€ RETURN VALUES ๐ŸŽ€

  • On success? it returns 0 โœจ we love a clean win.
  • On error? it returns -1 ๐Ÿ˜ญ and an error code gets handed back in handle.

you can grab that error code with nodeupdown_errnum(3), and get a whole description of it with nodeupdown_strerror(3). the error codes themselves are chillin' over in nodeupdown.h.


๐Ÿ’€ ERRORS ๐Ÿ’€

like, here's the whole drama list, bestie:

  • NODEUPDOWN_ERR_NULLHANDLE โ€” the handle parameter is NULL. literally nothing there. the nodeupdown handle has to be created with nodeupdown_handle_create(3) first, okay? ๐Ÿซถ
  • NODEUPDOWN_ERR_NOTLOADED โ€” nodeupdown_load_data(3) has not been called and no data has been retrieved. it's giving empty. it's giving nothing to work with.
  • NODEUPDOWN_ERR_PARAMETERS โ€” an incorrect parameter has been passed in. ๐Ÿ™ˆ something you gave it was just... not it.
  • NODEUPDOWN_ERR_OVERFLOW โ€” the buffer pointed to by buf is not large enough to store the ranged string of nodes. it simply does not fit and it is NOT gonna pretend otherwise.
  • NODEUPDOWN_ERR_OUTMEM โ€” malloc(3) has failed internally. memory said no. ๐Ÿ’€
  • NODEUPDOWN_ERR_CLUSTERLIST_MODULE โ€” internal error with the clusterlist module. not your fault, not our fault, it's just an internal moment.
  • NODEUPDOWN_ERR_HOSTLIST โ€” Hostlist API has failed internally. same vibe, different module.
  • 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). so either it was never a real handle or you already killed it. either way, it's gone, girl.

๐Ÿ“ FILES ๐Ÿ“

  • /usr/include/nodeupdown.h

๐ŸŒˆ SEE ALSO ๐ŸŒˆ

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


ngl if you're still confused, go read the _list versions instead โ€” sometimes you just want the list, not the ranged string. iykyk ๐Ÿ˜Œ

k bye bestie, this one came from LLNL, dated August 2003 โ€” yeah she's vintage but she still ate ๐Ÿ’…๐Ÿ‘‘ mwah ๐Ÿซถ

๐Ÿ“ฆ where this page comes from