PMDAPMID(3)

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

πŸ’– pmdaPMID(3) β€” the library-functions-manual bestie page πŸ’–

okay so. this is pmdaPMID(3), straight out of the Library Functions Manual, and it's here to help you turn a dynamic performance metric name into a PMID. yes bestie, that's the whole job. let's get into it πŸ¦‹


✨ NAME ✨

pmdaPMID β€” translate a dynamic performance metric name into a PMID


🌸 C SYNOPSIS 🌸

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

int pmdaPMID(char *name, pmID *pmid, pmdaExt *pmda);

cc ... -lpcp_pmda -lpcp

like. look at her. so compact. so clean. an icon πŸ’…


πŸŽ€ DESCRIPTION πŸŽ€

so here's the tea, bestie πŸ«– β€” as part of the Performance Metrics Domain Agent (PMDA) API (peep PMDA(3) for the full lore), pmdaPMID is the generic callback for translating a dynamic metric name into a PMID (pmid). that's the assignment. that's the mission. main character energy only πŸ‘‘

but now for the plot twist 😭 β€” implementing dynamic performance metrics needs specific PMDA support, and the whole facility is an optional component of a PMDA. and ngl, most PMDAs do not support dynamic performance metrics. so pmdaPMID is just a skeleton implementation that returns PM_ERR_NAME. it's giving placeholder. it's giving "we'll get to it". πŸ™ˆ

a PMDA that does support dynamic performance metrics will roll up with a private callback that replaces pmdaPMID β€” by assignment to version.four.pmid of the pmdaInterface structure β€” and that one actually implements the translation from a dynamic performance metric name into the associated pmid. periodt πŸ’œ


⚠️ CAVEAT ⚠️

the PMDA must be using PMDA_INTERFACE_4 or later, as specified in the call to pmdaDaemon(3) or pmdaDSO(3). no cap, this is not optional. if you're on an older interface, it's over for you πŸ’€

πŸ”₯ DIAGNOSTICS πŸ”₯

pmdaPMID returns PM_ERR_NAME if the name is not recognized or cannot be translated. otherwise? it returns 0. slay ✨


🌈 SEE ALSO 🌈


and that's the whole page bestie πŸŽ€ this one came to you from Performance Co-Pilot (that's the PCP gang, iykyk), filed under PMDAPMID(3). go forth, translate those dynamic metric names, and remember: skeleton implementations are still valid. we love a placeholder that knows what it is πŸ’–πŸ¦‹βœ¨

πŸ“¦ where this page comes from