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  string  values  (the
43       names)  that  the  pointers  reference  will have been allocated by pm‐
44       daChildren with a single call to malloc(3), and the caller of pmdaChil‐
45       dren  will  call  free(offspring)  to  release  the space when it is no
46       longer required.  The same holds true for the status array, namely  the
47       caller of pmdaChildren will call free(status) to release the space when
48       it is no longer required.
49

CAVEAT

51       The PMDA must be using PMDA_PROTOCOL_4 or later, as  specified  in  the
52       call to pmdaDSO(3) or pmdaDaemon(3).
53

DIAGNOSTICS

55       pmdaChildren  returns PM_ERR_NAME if the name is not recognized or can‐
56       not be translated, otherwise the  number  of  descendent  metric  names
57       found.
58

SEE ALSO

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