NODEUPDOWN_LAST_UP_TIME(3)
β¨ NODEUPDOWN_LAST_UP_TIME β¨
okay bestie, so this is a page from the LIBNODEUPDOWN manual, section 3 (that's the library-functions girlies π
), and the function is literally called nodeupdown_last_up_time. say it with me. iconic. let's get into it π«Ά
πΈ NAME πΈ
nodeupdown_last_up_time β retrieve time since epoch of the last known up time for a node.
no cap, that's the whole vibe: you wanna know when a node was last up, measured in time-since-epoch, and this function is gonna hand it to you.
π SYNOPSIS π
#include <nodeupdown.h>
int nodeupdown_last_up_time(nodeupdown_t handle, const char *node,
unsigned int *last_up_time);
look at her. three args, one int back. she's lowkey elegant fr fr.
π¦ DESCRIPTION π¦
so like. nodeupdown_last_up_time() returns the last known time since epoch that node was up. that value gets stashed in last_up_time. that's it. that's the whole thing. she does one job and she ate π₯
β RETURN VALUES β
- on success? 0. periodt. π
- on error? -1. and an error code gets returned in
handle. - wanna know what that error code actually means? you grab it with
nodeupdown_errnum(3), and the description of it comes fromnodeupdown_strerror(3). the error codes themselves are defined innodeupdown.h.
π ERRORS π
these are the girlies you might run into. know them, respect them:
NODEUPDOWN_ERR_NULLHANDLEβ thehandleparameter isNULL. babes, the nodeupdown 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)has not been called and no data has been retrieved. there's literally nothing loaded, so there's nothing to read. embarrassing but fixable β¨NODEUPDOWN_ERR_NOTFOUNDβ the node pointed to bynodeis not known. whoever that is, she's not on the list πNODEUPDOWN_ERR_NOTSUPPORTEDβ this feature is not supported by the local nodeupdown configuration. so like, it's not you, it's the config. main character energy blocked by the local setup πNODEUPDOWN_ERR_MAGICβhandlehas an incorrect magic number. meaning eitherhandledoes not point to a nodeupdown handle at all, orhandlehas been destroyed bynodeupdown_handle_destroy(3). yeah the magic number check is real and she will clock you π
π FILES π
/usr/include/nodeupdown.h
π SEE ALSO π
libnodeupdown(3)nodeupdown_handle_create(3)nodeupdown_load_data(3)nodeupdown_errnum(3)nodeupdown_strerror(3)
quick vibe check, bestie: every flag, error, path and return value above is exactly what the real page says β i'm just here to make it hit different π
this lil slice of libnodeupdown lore comes to you from LLNL, dated September 2007 β shoutout to the og authors, we stan. mwah πβ¨
π¦ 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