1PMSPECLOCALPMDA(3)         Library Functions Manual         PMSPECLOCALPMDA(3)
2
3
4

NAME

6       pmSpecLocalPMDA  -  process  command-line argument for the table of DSO
7       PMDAs
8

C SYNOPSIS

10       #include "pmapi.h"
11       #include "libpcp.h"
12
13       char *pmSpecLocalPMDA(const char *spec);
14
15       cc ... -lpcp
16

DESCRIPTION

18       For Performance Co-Pilot (PCP) applications, contexts of  type  PM_CON‐
19       TEXT_LOCAL are used by clients that wish to fetch metrics directly from
20       one or more PMDAs on the local host without involving pmcd(1).
21
22       pmSpecLocalPMDA provides a convenience wrapper to be used  by  applica‐
23       tions  that  wish  to  use a command line argument (usually with -K) to
24       control the DSO PMDAs that are available for  a  PM_CONTEXT_LOCAL  con‐
25       text.
26
27       The  spec argument specifies actions for one or more DSO PMDAs using up
28       to four fields separated by commas (``,''), namely:
29       -      an opcode with one of the values add  (add  a  new  entry),  del
30              (delete  an existing entry) or clear (clear all entries from the
31              table).
32       -      the PMDA's domain number
33       -      the path to the PMDA DSO (may be absolute  or  relative  to  the
34              $PCP_VAR_DIR/pmdas  directory  and  the DSO suffix is optional),
35              and
36       -      the name of the PMDA's initialization routine.
37
38       All fields are required to add a new entry.  To delete an entry the op‐
39       code  is  required  plus  either  or both of the domain number and path
40       fields.  To clear all entries, only the opcode is required.
41
42       If spec is parsed successfully, then the DSO table is updated with  the
43       extracted fields.
44

RETURN VALUE

46       On success, pmSpecLocalPMDA will return NULL.
47
48       On  error or failure, pmSpecLocalPMDA will return a pointer to a static
49       error message.
50

EXAMPLES

52       Some examples of valid spec strings:
53
54       clear  Delete all entries from the DSO table.
55
56       add,123,foo/foo_pmda,foo_init
57              Add the ``foo'' PMDA using domain 123.  The PMDA's DSO  is  most
58              likely   in   below   the  directory  $PCP_PMDAS_DIR  and  named
59              foo/foo_pmda.so (for ELF-style platforms) or  foo/foo_pmda.dylib
60              (for BSD-style platforms) or foo\foo_pmda.dll (for Windows-style
61              platforms).  The initialization routine for the ``foo'' PMDA  is
62              foo_init().
63
64       del,123
65              Delete the entry for the DSO with domain 123.
66
67       del,,foo/foo_pmda
68              Delete  the  entry  with  a  pathname  to  the  DSO that matches
69              foo/foo_pmda.
70
71       del,123,foo/foo_pmda
72              Delete the entry for the DSO with either  domain  123  and/or  a
73              pathname to the DSO that matches foo/foo_pmda.
74

SEE ALSO

76       pmcd(1), PMAPI(3) and pmNewContext(3).
77
78
79
80Performance Co-Pilot                                        PMSPECLOCALPMDA(3)
Impressum