PMDAHELP(3)

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

πŸ’– PMDAHELP(3) πŸ’–

ok so bestie, gather round, because this is the help text support page for a PMDA, and it's literally the manual you're reading right now (meta, I know). We're in the Library Functions Manual part of the PCP docs, and yes, the manual name is PMDAHELP β€” we been knew. 🫢


✨ NAME ✨

pmdaOpenHelp, pmdaGetHelp, pmdaGetInDomHelp, pmdaCloseHelp β€” help text support for a PMDA


πŸŽ€ C SYNOPSIS πŸŽ€

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

int pmdaOpenHelp(const char *fname);
char *pmdaGetHelp(int handle, pmID pmid, int type);
char *pmdaGetInDomHelp(int handle, pmInDom indom, int type);
void pmdaCloseHelp(int handle);

cc ... -lpcp_pmda -lpcp

πŸ¦‹ DESCRIPTION πŸ¦‹

So, as part of the Performance Metrics Domain Agent (PMDA) API β€” that's the one in PMDA(3), go look β€” this lil squad of routines is what implements the processing of a PMDA's metric help information. That's the whole job. That's the vibe.

real talk: these routines are really intended for internal use, and should not need to be called directly from any PMDA code. like, they're backstage crew, not main characters. don't @ them. πŸ™ˆ

Here's the tea, briefly: the base name of the help text file β€” the one that got created by newhelp(1) β€” gets passed in via a -h command line option if you're a daemon PMDA, or as an argument to pmdaDaemon(3) or pmdaDSO(3). ✨ Then pmdaOpenHelp gets called from pmdaInit(3) and hands back a handle, which is what you use in all the calls after that to say "yeah, this particular help text collection, the one right here". Each PMDA typically has only one such collection, so it's not a crowd. πŸ’…

Requests for help text get passed along to pmdaText(3), which then calls pmdaGetHelp or pmdaGetInDomHelp as required. Chain of command, bestie. πŸ‘‘

And other than the error cases in pmdaOpenHelp, pmdaCloseHelp is not called. It's giving "invited but never shows up". 😭


πŸ’€ CAVEAT πŸ’€

The PMDA must be using PMDA_INTERFACE_2 or later, as specified in the call to pmdaDSO(3) or pmdaDaemon(3). No earlier interface, no exceptions, periodt. ⭐


🌸 DIAGNOSTICS 🌸

  • pmdaOpenHelp returns a negative value on failure β€” and that value is suitable for decoding with pmErrStr(3). πŸŽ€
  • pmdaGetHelp and pmdaGetInDomHelp return NULL if the corresponding help text does not exist. gone, not found, no thoughts head empty. πŸ’€

🌈 SEE ALSO 🌈

newhelp(1), PMAPI(3), PMDA(3), pmdaDaemon(3), pmdaDSO(3), pmdaInit(3), pmdaText(3) and pmErrStr(3).


ok that's the page!! no cap, every single flag, handle and caveat is in there. πŸ₯°

this whole thing comes to you courtesy of Performance Co-Pilot (that's the PCP girlies 🌟), and yeah, it's the PMDAHELP(3) page β€” thanks for reading, love u, bye!! πŸ’–βœ¨πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from