PMDADESC(3)

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

πŸ’– NAME πŸ’–

pmdaDesc β€” bestie, it literally gets the description of a metric from a PMDA 🫢


✨ C SYNOPSIS ✨

okay so first you gotta pull in the headers, no skipping:

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

int pmdaDesc(pmID pmid, pmDesc *desc, pmdaExt *pmda);

cc ... -lpcp_pmda -lpcp

and yeah, you gotta link it up with -lpcp_pmda -lpcp or it's giving ✨undefined reference✨ energy and we do NOT want that πŸ’€


🌸 DESCRIPTION 🌸

so here's the vibe: pmdaDesc rolls up using the standard PMDA(3) data structures and hands you back the pmDesc description in desc for whichever metric you pointed at with pmid. that's it. that's the whole job. lowkey iconic, honestly πŸ‘‘

think of pmid as the name tag and desc as the whole personality profile that comes with it πŸ’…


πŸŽ€ CAVEAT πŸŽ€

real talk, bestie β€” this only works if your PMDA is running PMDA_INTERFACE_2 or later. and not just vibes-later, like actually specified in the call to pmdaDSO(3) or pmdaDaemon(3). if you're on something older than that, this is not your era and it will not slay 😭

πŸ”₯ DIAGNOSTICS πŸ”₯

if the pmid doesn't match any metric your PMDA actually supports, pmdaDesc returns PM_ERR_PMID. not a crash, not a mystery, just a very direct "girl that metric does not exist here" πŸ™ˆ


πŸ¦‹ SEE ALSO πŸ¦‹

go read them, they're all part of the same friend group iykyk 🫢


this whole page came to you courtesy of Performance Co-Pilot (aka PCP) β€” the <pink>PMDADESC(3)</pink> entry, bestie πŸ’– thanks for reading, now go describe some metrics, periodt βœ¨πŸ’…

πŸ“¦ where this page comes from