PMDANAME(3)
π PMDANAME(3) β bestie edition π
Library Functions Manual Β· pmdaName(3)
okay so bestie, buckle up, we're doing dynamic performance metric name translation and it's gonna be a whole vibe β¨
πΈ NAME πΈ
pmdaName β translate a PMID to a set of dynamic performance metric names π¦
β¨ C SYNOPSIS β¨
#include <pcp/pmapi.h>
#include <pcp/pmda.h>
int pmdaName(pmID pmid, char ***nameset, pmdaExt *pmda);
cc ... -lpcp_pmda -lpcp
like, two includes, one function, one compile line. iconic, no notes π
π DESCRIPTION π
So pmdaName is part of the Performance Metrics Domain Agent (PMDA) API (go read PMDA(3) if you haven't, bestie, I'll wait π«Ά). It's the generic callback for translating a pmid into one or more dynamic metric names, which it hands back in nameset.
Now here's the tea β β implementing dynamic performance metrics needs specific PMDA support, and honestly? It's an optional component of a PMDA. Like, most PMDAs do not support dynamic performance metrics. So pmdaName is literally just a skeleton implementation that returns PM_ERR_NAME. It's giving placeholder. It's giving "we'll get to it". π
But a PMDA that does support dynamic performance metrics will provide a private callback that replaces pmdaName β and the way you do that is by assignment to version.four.name of the pmdaInterface structure, iykyk β and that callback implements the translation from a pmid to a set of dynamic performance metric names returned via nameset.
And the behaviour, the return values, and the memory allocation rules for nameset? Same as pmNameAll(3). Periodt. Go look at that one, don't make me say it twice π
π CAVEAT π
β οΈ bestie. listen. The PMDA must be usingPMDA_INTERFACE_4or later, as specified in the call topmdaDSO(3)orpmdaDaemon(3). If you're on an older interface you're not gonna have a good time π
π DIAGNOSTICS π
pmdaName returns PM_ERR_PMID if the name is not recognized or cannot be translated. Otherwise it returns the number of metric names found β and most commonly that's just 1, because usually there's only one, bestie π
π SEE ALSO π
and that's the whole page, no cap π«Ά this little manual came from Performance Co-Pilot (PCP), it's PMDANAME(3), and it's been living in this library-functions-manual era since forever ago. go translate some names, bestie, you got this π
β¨π¦
π¦ where this page comes from
- arch rolling: pcp 7.2.2-2 Β· GPL-2.0-or-later AND LGPL-2.1-or-later AND CC-BY-3.0
- centos-stream 10: pcp-doc 7.1.5-6.el10 Β· GPL-2.0-or-later AND CC-BY-3.0
- fedora 43: pcp-doc 7.0.1-1.fc43 Β· GPL-2.0-or-later AND CC-BY-3.0
- fedora 43: pcp-doc 7.2.1-1.fc43
- fedora 43: pcp-doc 7.2.2-1.fc43
- fedora 43: pcp-doc 7.2.2-2.fc43 Β· GPL-2.0-or-later AND CC-BY-3.0
- fedora 44: pcp-doc 7.1.0-6.fc44 Β· GPL-2.0-or-later AND CC-BY-3.0
- fedora 44: pcp-doc 7.2.1-1.fc44
- fedora 44: pcp-doc 7.2.2-1.fc44
- fedora 44: pcp-doc 7.2.2-2.fc44 Β· GPL-2.0-or-later AND CC-BY-3.0
- ubuntu resolute: libpcp-pmda3-dev 7.1.1-1
- ubuntu stonking: libpcp-pmda3-dev 7.2.1-2build1
- Copyright (c) 2000-2004 Silicon Graphics, Inc. All Rights Reserved
- Copyright (c) 2009 Ken McDonell. All Rights Reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms