1PMDACONNECT(3) Library Functions Manual PMDACONNECT(3)
2
3
4
6 pmdaConnect - establish a connection between a daemon PMDA and PMCD
7
9 #include <pcp/pmapi.h>
10 #include <pcp/impl.h>
11 #include <pcp/pmda.h>
12
13 void pmdaConnect(pmdaInterface * dispatch);
14
15 cc ... -lpcp_pmda -lpcp
16
18 pmdaConnect initializes an IPC channel between a PMDA(3) and the
19 pmcd(1) process on the local host. The type of the connection is
20 dependent on the e_io field of the pmdaExt structure:
21
22 pmdaPipe Use stdin/stdout to communicate; assumes this is a pipe
23 created by pmcd before the PMDA(3) was launched.
24
25 pmdaInet Assume pmcd(1) will establish a connection to an inter‐
26 net domain socket set up by the PMDA(3). The name or
27 number of the port must be specified in the e_sockname
28 or e_port fields of the pmdaExt structure, respectively.
29
30 pmdaUnix Assume pmcd(1) will establish a connection to a unix
31 domain socket set up by the PMDA(3). The port number
32 must be specified in the e_port field of the pmdaExt
33 structure.
34
35 pmdaUnknown The initial value of e_io which defaults to using
36 stdin/stdout.
37
38 The relevant pmdaExt fields are initialized by pmdaInit(3) and set by
39 pmdaGetOpt(3), so most PMDAs should not need to access or modify them.
40
42 pmdaConnect will log the type of connection made to pmcd(1) if the
43 PMAPI(3) debug control variable (pmDebug) has the DBG_TRACE_LIBPMDA
44 flag set.
45
46 If an error occurs that is unrecoverable, dispatch->status is set to a
47 value less than 0, otherwise it is zero or positive.
48
50 The PMDA must be using PMDA_INTERFACE_2 or later, as specified in the
51 call to pmdaDaemon(3).
52
54 pmcd(1), pipe(2), socket(2), PMAPI(3), PMDA(3), pmdaDaemon(3), pmdaGe‐
55 tOpt(3) and pmdaInit(3).
56
57
58
59Performance Co-Pilot SGI PMDACONNECT(3)