PMDATEXT(3)
π PMDATEXT(3) β the pmdaText glow-up π
okay so bestie, welcome to the Library Functions Manual entry for PMDATEXT(3). This is the lil function that goes and fetches the help text for a metric, and honestly? She's serving. Let's get into it. π
β¨ NAME β¨
pmdaText β pull the metric help text out for a PMDA π«Ά
πΈ C SYNOPSIS πΈ
#include <pcp/pmapi.h>
#include <pcp/pmda.h>
int pmdaText(int ident, int type, char **buffer, pmdaExt *pmda);
cc ... -lpcp_pmda -lpcp
π DESCRIPTION π
So, context: this is part of the Performance Metrics Domain Agent (PMDA) API β go peek at PMDA(3) if you haven't, iykyk. pmdaText uses the standard PMDA(3) data structures to hand you back the help text for metric ident, dropped right into buffer. β¨
Important: that help text has to live in help text files that were made with newhelp(1), and the associated files get opened automatically by pmdaInit(3). No cap, it just does it for you. π
You can set the path to the (basename of the) help text files when you call pmdaDSO(3) or pmdaDaemon(3) β and the -h command line option in pmdaGetOpt(3) can override that. π«
Now, the encoding of ident? It follows the same internal scheme used down below the routines pmLookupText(3) and pmLookupInDomText(3). Basically, ident encodes either a metric identifier or an instance domain identifier, and which one depends on the value of type. π
The type argument is a bit mask that says how to read ident and what form of help text you want. Here's the tea:
PM_TEXT_PMIDβ meansidentis a metric identifierPM_TEXT_INDOMβ meansidentis an instance domain identifier
β¦and then plus one of these:
PM_TEXT_ONELINEβ for the one line help textPM_TEXT_HELPβ for the full help text
And about buffer? It's managed internally (usually it's cached, she's cozy), so do NOT release or free it if you're the caller of pmdaText. Hands off, bestie. π
ββοΈ
β οΈ CAVEAT β οΈ
The PMDA has to be usingPMDA_INTERFACE_2or later, as specified in the call topmdaDSO(3)orpmdaDaemon(3). Older than that? Not it. π
π©Ί DIAGNOSTICS π©Ί
If the requested help text just could not be obtained, pmdaText will return PM_ERR_TEXT. Sad girl hours. π
π SEE ALSO π
newhelp(1)malloc(3)PMAPI(3)PMDA(3)pmdaDaemon(3)pmdaDSO(3)pmdaInit(3)pmLookupInDomText(3)pmLookupText(3)
And that's the whole page, bestie β brought to you by Performance Co-Pilot (that's the source, and the version is PCP), under the title PMDATEXT(3). Go forth and read your help text. Slay. π β¨π¦
π¦ 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
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms