GENPMDA(1)
π GENPMDA(1) π
okay so bestie, welcome to genpmda β the Performance Co-Pilot PMDA Generator β¨ (that's the genpmda page from the General Commands Manual, section 1, iykyk π«Ά)
β¨ NAME β¨
genpmda β Performance Co-Pilot PMDA Generator πΈ
π SYNOPSIS π
genpmda [-dv] [-D domain] [-n pmns] [-o dir] [-s stdpmid] [-t topdir] -c
config -i IAM
π¦ DESCRIPTION π¦
so genpmda is literally a rapid application development tool for making brand new Performance Metrics Domain Agents β go peek at PMDA(3) for the lore π. It's the easiest, most efficient way to extend the Performance Co-pilot (PCP) with new performance metrics, and the whole point is that you do NOT have to understand the low level details of how PMDAs are constructed. no cap. π
ββοΈ
Here's the tea: genpmda reads a config file that contains an augmented Performance Metrics Name Space (see PMNS(5)), and then it automatically generates virtually all of the source code to implement a fully functional PMDA π
. And when we say all, we mean:
- the
Makefile - the name space
- support scripts for configuring the new PMDA
- the metrics help text
Fairly simple PMDAs can be automatically generated straight from the config file without you writing any additional code. iconic behavior honestly π. More complicated PMDAs β like, say, ones containing multiple instance domains β require only the refresh methods for the instance domains to be written manually. that's it. that's the whole job. π«Ά
An example of the config file format accepted by genpmda is given below π
π OPTIONS π
π Required options (you literally cannot skip these)
-cconfig β input config file, see example below π-iIAM β PMDA nameIAM, and bestie it should appear instdpmid, or the-Doption must be used to specify a domain β οΈ
π Other options (the fun ones)
-dβ generate anInstallscript for a daemon PMDA (default is DSO)-Ddomain β use domain number in the generatedpmnsanddomain.h(if-sis not given)-npmns β use pmns as root of the namespace (default matches the-iflag)-odir β use dir for generated source code, default./generated-sstdpmid β path tostdpmid(default../../pmns/stdpmid)-ttopdir β use topdir in generatedGNUmakefile, default../../..-vβ print verbose messages about whatgenpmdais doing π (she will narrate her whole life to you)
πΈ Example πΈ
Generate an "example" PMDA using domain 99:
genpmda -D 99 -v -i EXAMPLE -c example.conf
Here is example.conf config file (for the required -c option):
example {
metric
}
example.metric {
## metric string
## pmid EXAMPLE:CLUSTER:0
## indom PM_INDOM_NULL
## type PM_TYPE_STRING
## units PMDA_PMUNITS(0,0,0,0,0,0)
## semantics PM_SEM_DISCRETE
## briefhelptext one line help text for example.metric.string
## helptext long help text for example.metric.string
## helptext This is the second line of the long help text
## helptext and this is the third line.
## fetch function example_string_fetch_callback
## code atom->cp = "hello world";
## code return 1;
## endmetric
}
π PCP ENVIRONMENT π
Environment variables with the prefix PCP_ are used to parameterize the file and directory names used by PCP. π§ On each installation, the file /etc/pcp.conf contains the local values for these variables. The $PCP_CONF variable may be used to specify an alternative configuration file, as described in pcp.conf(5). π
π SEE ALSO π
pmcd(1), PMDA(3), pcp.conf(5), pcp.env(5) and PMNS(5). go read them, they're all lowkey essential π
and that's the whole page bestie!! this one comes to you from Performance Co-Pilot β that's the PCP of it all β and it lives in the manual as GENPMDA(1) β¨ mwah, go generate something iconic πππ¦
π¦ 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
- centos-stream 9: pcp-doc 6.3.7-14.el9 Β· GPL-2.0-or-later AND CC-BY-3.0
- debian trixie: pcp 6.3.8-1
- 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 questing: pcp 6.3.8-1
- ubuntu resolute: pcp 7.1.1-1
- ubuntu stonking: pcp 7.2.1-2build1
- Copyright (c) 2005 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