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/pmda.h>
11
12       int pmdaDSO(pmdaInterface *dispatch, int interface, char *name,
13               char *helptext);
14
15       cc ... -lpcp_pmda -lpcp
16

DESCRIPTION

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

CAVEAT

38       The PMDA must be using PMDA_INTERFACE_2 or later.
39
40       Once  pmdaDSO  has  been  called, it is expected that the pmdaInterface
41       structure pointed to by dispatch will remain accessible to the routines
42       in  libpcp_pmda (not reclaimed off the stack, not freed or oherwise re‐
43       leased, etc.).  If the caller needs to move or relocate the  pmdaInter‐
44       face  structure  for  any  reason,  then  after the move pmdaInterface‐
45       Moved(3) must be called to resestablish the internal integrity  of  the
46       pmdaInterface structure at the new location before any other routine in
47       libpcp_pmda is called.
48

DIAGNOSTICS

50       Incompatible version of pmcd detected
51                      When pmcd(1) creates the  pmdaInterface  structure,  the
52                      dispatch.comm.version field is set to the highest proto‐
53                      col that pmcd(1) understands.   This  message  indicates
54                      that  the pmcd(1) process does not understand the proto‐
55                      col used by pmdaDSO.
56
57       Unable to allocate memory for pmdaExt structure
58                      In addition, dispatch->status is set  to  a  value  less
59                      than zero.
60

SEE ALSO

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)
Impressum