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 <pcp/pmapi.h>
11       #include <pcp/impl.h>
12
13       char *__pmSpecLocalPMDA(const char *spec);
14
15       cc ... -lpcp
16

DESCRIPTION

18       PCP contexts of type PM_CONTEXT_LOCAL are used by clients that wish  to
19       fetch metrics directly from one or more PMDAs on the local host without
20       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
31          the 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
39       the  opcode is required plus either or both of the domain number
40       and path fields.  To clear  all  entries,  only  the  opcode  is
41       required.
42
43       If  spec is parsed successfully, then __pmLocalPMDA(3) is called
44       with the extracted arguments.
45

RETURN VALUE

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

EXAMPLES

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

SEE ALSO

77       PMAPI(3), __pmLocalPMDA(3) and pmNewContext(3).
78
79
80
81Performance Co-Pilot                                        PMSPECLOCALPMDA(3)
Impressum