PMDASENDERROR(3)

πŸ“¦
version 7.2.2 Β· 3 versions
, in arch rolling, centos-stream 10, fedora 43, fedora 44, ubuntu resolute, ubuntu stonking

πŸ’– PMDASENDERROR πŸ’–

okay bestie, welcome to the PMDASENDERROR page from the Library Functions Manual β€” it's short, it's sweet, and it's literally the "hey PMCD, I'm awake!!" button. let's get into it 🫢


✨ NAME ✨

pmdaSendError β€” send an error PDU to PMCD 🌸


✨ C SYNOPSIS ✨

#include <pcp/pmapi.h>
#include <pcp/pmda.h>

void pmdaSendError(pmdaInterface *dispatch, int err);

cc ... -lpcp_pmda -lpcp

so like, you grab those two headers, you call pmdaSendError() with a pmdaInterface *dispatch and an int err, and you link against -lpcp_pmda and -lpcp. that's the whole vibe πŸ’…


✨ PYTHON SYNOPSIS ✨

from pcp.pmda import PMDA
PMDA.pmda_notready()
PMDA.pmda_ready()

python girlies, you don't even touch pmdaSendError directly β€” you get these two cutie methods instead. no cap. 🐍


✨ DESCRIPTION ✨

okay so as part of the Performance Metrics Domain Agent (PMDA) API (peep PMDA(3) for the full lore), this routine lets a PMDA send an error PDU over to PMCD. πŸ“¨

and like… there's presently only one use for this β€” it's so the PMDA can tell PMCD that it is ready (or not ready) to process requests. that's it. that's the whole job. iconic behavior honestly πŸ‘‘

the protocol details live in pmcd(1) and PMDA(3), but basically: if a PMDA starts in the notready state (which may be specified in pmcd.conf, see pmcd(1)), then PMCD will not send it any requests until the PMDA sends an PM_ERR_PMDAREADY error PDU using this function. like, PMCD is respectfully waiting for the text back. πŸ“΅

and why would you ever want that?? because a PMDA might have a long startup time, e.g. to process a large configuration file or similar. so you go notready β†’ do your little startup ritual β†’ then hit it with the ready PDU and everyone's happy. 🌈✨

fr fr, if you forget to send that PM_ERR_PMDAREADY, PMCD just keeps ignoring you. awkward. πŸ’€

✨ SEE ALSO ✨


and that's the page, bestie!! this little baddie comes to you from Performance Co-Pilot β€” the PCP girlies β€” and it's filed under PMDASENDERROR(3). go forth and send your error PDUs responsibly πŸ’–πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from