NODEUPDOWN_GET_UP_NODES_LIST(3)
π NODEUPDOWN_GET_UP_NODES_LIST π
okay bestie, welcome to the LIBNODEUPDOWN corner of the manual, section 3, and today we're getting a whole entire list of nodes. yes. a list. we're listing. π¦
β¨ NAME β¨
nodeupdown_get_up_nodes_list, nodeupdown_get_down_nodes_list β get up or down nodes
like. the up ones or the down ones. you pick. π
πΈ 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 a list of nodes that are up and drops each node name into the list that list points to. and len? that's you telling it how many nodes can actually fit in list. be honest with it. π
nodeupdown_get_down_nodes_list() is literally identical to nodeupdown_get_up_nodes_list() β same energy, same everything β except it gets a list of down nodes instead. that's it. that's the difference. π
and listen, to avoid passing in a list that isn't big enough to hold all the up or down nodes, you should use nodeupdown_nodelist_create(3) to make a list that's guaranteed to be large enough for all the nodes. it's giving prepared. it's giving responsible. π«Ά
π₯ RETURN VALUES π₯
on success? it returns the number of nodes copied into list. slay.
on error it returns -1, and an error code gets returned in handle. you can grab that error code with nodeupdown_errnum(3), and get a whole description of what it means via nodeupdown_strerror(3). all the error codes live in nodeupdown.h. no cap. β¨
π ERRORS π
NODEUPDOWN_ERR_NULLHANDLEβ thehandleparameter isNULL. bestie the handle has to be created withnodeupdown_handle_create(3)first, you can't just show up with nothing. πNODEUPDOWN_ERR_NOTLOADEDβnodeupdown_load_data(3)hasn't been called and no data has been retrieved. nothing's loaded. there's nothing here. πNODEUPDOWN_ERR_PARAMETERSβ an incorrect parameter got passed in. oops.NODEUPDOWN_ERR_NULLPTRβ a null pointer was found in the list that got passed in. yikes.NODEUPDOWN_ERR_OVERFLOWβ the list pointed to bylistis not large enough to store all the nodes. told you to usenodeupdown_nodelist_create(3). πNODEUPDOWN_ERR_OUTMEMβmalloc(3)failed internally. the memory said no. πNODEUPDOWN_ERR_CLUSTERLIST_MODULEβ internal error with the clusterlist module.NODEUPDOWN_ERR_HOSTLISTβ the Hostlist API has failed internally.NODEUPDOWN_ERR_MAGICβhandlehas an incorrect magic number. meaninghandledoesn't point to a nodeupdown handle at all, or it's been destroyed bynodeupdown_handle_destroy(3). the magic is gone. rip. πͺ¦
π 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)
go read those too, iykyk. πβ¨
and that's the whole page, bestie!! brought to you by the lovely people at LLNL, way back in August 2003 β iconic of them honestly, this page has been serving for decades and 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