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

NAME

6       pmdaChildren  - translate a PMID to a set of dynamic performance metric
7       names
8

C SYNOPSIS

10       #include <pcp/pmapi.h>
11       #include <pcp/pmda.h>
12
13       int pmdaChildren(char *name, int traverse, char ***offspring,
14               int **status, pmdaExt *pmda);
15
16       cc ... -lpcp_pmda -lpcp
17

DESCRIPTION

19       As  part  of  the  Performance Metrics Domain Agent (PMDA) API (see PM‐
20       DA(3)), pmdaChildren is the generic callback for returning dynamic met‐
21       ric names (and their status) that are descendants of name.
22
23       Because implementing dynamic performance metrics requires specific PMDA
24       support, and the facility is an optional component of a PMDA (most  PM‐
25       DAs  do  not  support  dynamic  performance metrics), pmdaChildren is a
26       skeleton implementation that returns PM_ERR_NAME.
27
28       A PMDA that supports dynamic performance metrics will provide a private
29       callback   that   replaces   pmdaChildren   (by   assignment   to  ver‐
30       sion.four.children of the pmdaInterface structure) and takes  the  ini‐
31       tial metric name and returns names via offspring[] and the leaf or non-
32       leaf status of each via status[].
33
34       If traverse is 0, then the behaviour is akin  to  pmGetChildren(3)  and
35       offspring[]  contains the relative name component for the immediate de‐
36       scendants of name.
37
38       If traverse is 1, then the behaviour is akin to  pmTraversePMNS(3)  and
39       offspring[] contains the absolute names of all dynamic metrics that are
40       decedents of name.
41
42       The resulting list of pointers offspring and  the  values  (the  names)
43       that  the  pointers  reference will have been allocated by pmdaChildren
44       with a single call to malloc(3), and the caller  of  pmdaChildren  will
45       call  free(offspring)  to  release  the  space when it is no longer re‐
46       quired.  The same holds true for the status array.
47

DIAGNOSTICS

49       pmdaChildren returns PM_ERR_NAME if the name is not recognized or  can‐
50       not  be  translated,  otherwise  the  number of descendent metric names
51       found.
52

CAVEAT

54       The PMDA must be using PMDA_PROTOCOL_4 or later, as  specified  in  the
55       call to pmdaDSO(3) or pmdaDaemon(3).
56

SEE ALSO

58       PMAPI(3),  PMDA(3),  pmdaDaemon(3), pmdaDSO(3), pmdaMain(3), pmGetChil‐
59       dren(3) and pmTraversePMNS(3).
60
61
62
63Performance Co-Pilot                  PCP                      PMDACHILDREN(3)
Impressum