NODEUPDOWN_GET_UP_NODES_LIST(3)
β¨ NODEUPDOWN_GET_UP_NODES_LIST β¨
okay bestie, welcome to nodeupdown_get_up_nodes_list(3), nodeupdown_get_down_nodes_list(3) β part of the LIBNODEUPDOWN manual, third section, the library calls, you know the vibe π
πΈ NAME πΈ
nodeupdown_get_up_nodes_list, nodeupdown_get_down_nodes_list β bestie, these two literally just get you the up nodes or the down nodes. that's it. that's the whole job. π¦
π SYNOPSIS π
#include <nodeupdown.h>
int nodeupdown_get_up_nodes_list(nodeupdown_t handle, char **list, int
len);
int nodeupdown_get_down_nodes_list(nodeupdown_t handle, char **list, int
len);
π DESCRIPTION π
so nodeupdown_get_up_nodes_list() goes and fetches you a list of all the nodes that are up, and it drops each node name into the list that list points at. and len? that's you telling it how many nodes you can actually fit in list. don't lie to it, it will find out. π
nodeupdown_get_down_nodes_list() is the exact same thing, no cap β identical in every way β except it hands you the down nodes instead. same energy, opposite outcome. π«Ά
okay so real talk: to avoid passing in a list that isn't big enough to hold all the up or down nodes, use nodeupdown_nodelist_create(3) to make your list. it's guaranteed to be large enough for every single node. save yourself the heartbreak. π
β RETURN VALUES β
slay, here's the deal:
- on success, it returns the number of nodes it copied into
listπ - on error, it returns
-1, and an error code gets stashed inhandle
you can grab that error code with nodeupdown_errnum(3), and get a lil description of what went wrong with nodeupdown_strerror(3). the error codes themselves are all defined in nodeupdown.h, iykyk. π
π ERRORS π
here's every single one, bestie, no skipping:
NODEUPDOWN_ERR_NULLHANDLEβ thehandleparameter isNULL. you gotta make that nodeupdown handle withnodeupdown_handle_create(3)first. it's giving "forgot the main character." πNODEUPDOWN_ERR_NOTLOADEDβnodeupdown_load_data(3)has not been called, and no data has been retrieved. no data, no list, periodt. πNODEUPDOWN_ERR_PARAMETERSβ an incorrect parameter got passed in. wrong vibe, rejected. πNODEUPDOWN_ERR_NULLPTRβ there's a null pointer hanging out in the list you passed in. πNODEUPDOWN_ERR_OVERFLOWβ the list thatlistpoints to is not large enough to store all the nodes. it overflowed. it's over. πNODEUPDOWN_ERR_OUTMEMβmalloc(3)failed internally. the memory said no. π₯NODEUPDOWN_ERR_CLUSTERLIST_MODULEβ internal error with the clusterlist module. not your fault, lowkey. π¦NODEUPDOWN_ERR_HOSTLISTβ the Hostlist API has failed internally. it's giving chaos. πΈNODEUPDOWN_ERR_MAGICβhandlehas an incorrect magic number. eitherhandledoesn't point to a nodeupdown handle at all, or it's already been destroyed bynodeupdown_handle_destroy(3). the magic is gone, bestie. β¨
π§ FILES π§
/usr/include/nodeupdown.h
π SEE ALSO π
libnodeupdown(3), nodeupdown_handle_create(3), nodeupdown_load_data(3), nodeupdown_get_up_nodes_string (3), nodeupdown_get_down_nodes_string (3), nodeupdown_errnum(3), nodeupdown_strerror(3)
and that's the whole page, bestie, you ate it π this iconic lil number comes to you from LLNL, dated August 2003 β yeah, it's vintage, and it still slays. bye bye, go read some more manpages π«Άβ¨
π¦ 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