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/impl.h>
12       #include <pcp/pmda.h>
13
14       int pmdaChildren(char  *name,  int  traverse,  char  ***offspring,  int
15       **status, pmdaExt *pmda)
16
17       cc ... -lpcp_pmda -lpcp
18

DESCRIPTION

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

DIAGNOSTICS

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

CAVEAT

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

SEE ALSO

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