1PMDADSO(3) Library Functions Manual PMDADSO(3)
2
3
4
6 pmdaDSO - initialize the PMDA to run as a DSO
7
9 #include <pcp/pmapi.h>
10 #include <pcp/pmda.h>
11
12 int pmdaDSO(pmdaInterface *dispatch, int interface, char *name,
13 char *helptext);
14
15 cc ... -lpcp_pmda -lpcp
16
18 pmdaDSO initializes the pmdaInterface structure to use the interface
19 extensions, assuming the PMDA(3) is to be run as a DSO. The pmdaInter‐
20 face structure is initialized with:
21
22 name The name of the agent.
23
24 helptext The default path to the help text (see pmdaText(3)). If
25 no help text is installed, or you are not using pmda‐
26 Text(3), then this should be set to NULL, otherwise
27 helptext will be copied, so the storage associated with
28 helptext may be released after the call to pmdaDSO.
29
30 The callbacks are initialized to pmdaProfile(3), pmdaFetch(3), pmdaDe‐
31 sc(3), pmdaText(3), pmdaInstance(3) and pmdaStore(3).
32
33 The interface structure also contains the domain of the PMDA(3), which
34 is defined in the pmcd(1) configuration file. The domain is used to
35 initialize the metric and instance descriptors (see pmdaInit(3)).
36
38 Incompatible version of pmcd detected
39 When pmcd(1) creates the pmdaInterface structure, the
40 dispatch.comm.version field is set to the highest proto‐
41 col that pmcd(1) understands. This message indicates
42 that the pmcd(1) process does not understand the proto‐
43 col used by pmdaDSO.
44
45 Unable to allocate memory for pmdaExt structure
46 In addition, dispatch->status is set to a value less
47 than zero.
48
50 The PMDA must be using PMDA_INTERFACE_2 or later.
51
52 Once pmdaDSO has been called, it is expected that the pmdaInterface
53 structure pointed to by dispatch will remain accessible to the routines
54 in libpcp_pmda (not reclaimed off the stack, not freed or oherwise re‐
55 leased, etc.). If the caller needs to move or relocate the pmdaInter‐
56 face structure for any reason, then after the move pmdaInterface‐
57 Moved(3) must be called to resestablish the internal integrity of the
58 pmdaInterface structure at the new location before any other routine in
59 libpcp_pmda is called.
60
62 pmcd(1), PMAPI(3), PMDA(3), pmdaDaemon(3), pmdaInit(3), pmdaInterface‐
63 Moved(3) and pmdaText(3).
64
65
66
67Performance Co-Pilot PCP PMDADSO(3)