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

NAME

6       pmdaDSO - initialize the PMDA to run as a DSO
7

C SYNOPSIS

9       #include <pcp/pmapi.h>
10       #include <pcp/impl.h>
11       #include <pcp/pmda.h>
12
13       int pmdaDSO(pmdaInterface *dispatch, int interface, char *name,
14               char *helptext);
15
16       cc ... -lpcp_pmda -lpcp
17

DESCRIPTION

19       pmdaDSO initializes the pmdaInterface structure to  use  the  interface
20       extensions, assuming the PMDA(3) is to be run as a DSO.  The pmdaInter‐
21       face structure is initialized with:
22
23       name           The name of the agent.
24
25       helptext       The default path to the help text (see pmdaText(3)).  If
26                      no  help  text  is installed, or you are not using pmda‐
27                      Text(3), then this should be set to NULL.
28
29       The callbacks are initialized to pmdaProfile(3), pmdaFetch(3),  pmdaDe‐
30       sc(3), pmdaText(3), pmdaInstance(3) and pmdaStore(3).
31
32       The  interface structure also contains the domain of the PMDA(3), which
33       is defined in the pmcd(1) configuration file. The  domain  is  used  to
34       initialize the metric and instance descriptors (see pmdaInit(3)).
35

DIAGNOSTICS

37       Incompatible version of pmcd detected
38                      When  pmcd(1)  creates  the pmdaInterface structure, the
39                      dispatch.comm.version field is set to the highest proto‐
40                      col  that  pmcd(1)  understands.  This message indicates
41                      that the pmcd(1) process does not understand the  proto‐
42                      col used by pmdaDSO.
43
44       Unable to allocate memory for pmdaExt structure
45                      In  addition,  dispatch->status  is  set to a value less
46                      than zero.
47

CAVEAT

49       The PMDA must be using PMDA_INTERFACE_2 or later.
50
51       Once pmdaDSO has been called, it is  expected  that  the  pmdaInterface
52       structure pointed to by dispatch will remain accessible to the routines
53       in libpcp_pmda (not reclaimed off the stack, not freed or oherwise  re‐
54       leased,  etc.).  If the caller needs to move or relocate the pmdaInter‐
55       face structure for any  reason,  then  after  the  move  pmdaInterface‐
56       Moved(3)  must  be called to resestablish the internal integrity of the
57       pmdaInterface structure at the new location before any other routine in
58       libpcp_pmda is called.
59

SEE ALSO

61       pmcd(1),  PMAPI(3), PMDA(3), pmdaDaemon(3), pmdaInit(3), pmdaInterface‐
62       Moved(3) and pmdaText(3).
63
64
65
66Performance Co-Pilot                  PCP                           PMDADSO(3)
Impressum