PMLOOKUPINDOMTEXT(3)

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

πŸ’– PMLOOKUPINDOMTEXT(3) πŸ’–

okay so bestie, welcome to the Library Functions Manual page for pmLookupInDomText β€” yes that's the whole vibe, we're in the PCP girlies' section of the man pages and it's iconic ✨


🌸 NAME 🌸

pmLookupInDomText β€” return text describing a performance metrics instance domain


πŸŽ€ C SYNOPSIS πŸŽ€

#include <pcp/pmapi.h>

int pmLookupInDomText(pmInDom indom, int level, char **buffer);

cc ... -lpcp

✨ DESCRIPTION ✨

So what this does, fr fr: it grabs descriptive text about the performance metrics instance domain that's identified by indom. πŸ¦‹

The value for the instance domain indom is typically pulled out of a pmDesc structure, right after you call pmLookupDesc(3) for a particular performance metric. like, that's the normal way you'd get it, no cap. πŸ’…

Now, the level argument β€” you gotta pick your vibe:

  • PM_TEXT_ONELINE if you want a cute one-line summary πŸ’«
  • otherwise PM_TEXT_HELP for a more verbose description, the kind that's suited to a help dialog πŸ“–

and the space pointed to by buffer? that's been allocated inside pmLookupInDomText using malloc(3). so heads up, it is your responsibility as the caller to free(3) that space once you don't need it anymore. don't leave it hanging, bestie, that's a leak 😭

pmLookupInDomText returns zero on success. slay. πŸ‘‘


πŸ’€ DIAGNOSTICS πŸ’€

  • PM_ERR_NOTHOST β€” for archives created with versions of PCP prior to 4.0, if the current PMAPI context is an archive (help and one-line text was previously not maintained in the archives)
lowkey a throwback error. if you're poking at old archives, this one's gonna find you πŸ™ˆ

🌈 SEE ALSO 🌈

chkhelp(1), newhelp(1), PMAPI(3), pmGetConfig(3), pmLookupDesc(3), pmLookupLabels(3), pmLookupText(3), pcp.conf(5) and pcp.env(5).


and that's the whole page, periodt 🫢 this came to you from Performance Co-Pilot (PCP), filed under PMLOOKUPINDOMTEXT(3) β€” go read the source, ily, bye πŸ’œπŸ§šβ€β™€οΈ

πŸ“¦ where this page comes from