GENPMDA(1)

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

πŸ’– 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)

  • -c config β€” input config file, see example below πŸ“„
  • -i IAM β€” PMDA name IAM, and bestie it should appear in stdpmid, or the -D option must be used to specify a domain ⚠️

🌈 Other options (the fun ones)

  • -d β€” generate an Install script for a daemon PMDA (default is DSO)
  • -D domain β€” use domain number in the generated pmns and domain.h (if -s is not given)
  • -n pmns β€” use pmns as root of the namespace (default matches the -i flag)
  • -o dir β€” use dir for generated source code, default ./generated
  • -s stdpmid β€” path to stdpmid (default ../../pmns/stdpmid)
  • -t topdir β€” use topdir in generated GNUmakefile, default ../../..
  • -v β€” print verbose messages about what genpmda is 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