1PMDAEVENTCLIENT(3) Library Functions Manual PMDAEVENTCLIENT(3)
2
3
4
6 pmdaEventNewClient, pmdaEventEndClient, pmdaEventClients - client con‐
7 text tracking interfaces for event queues
8
10 #include <pcp/pmapi.h>
11 #include <pcp/pmda.h>
12
13 int pmdaEventNewClient(int context);
14 int pmdaEventEndClient(int context);
15 int pmdaEventClients(pmAtomValue *avp);
16
17 cc ... -lpcp_pmda -lpcp
18
20 A Performance Metrics Domain Agent (PMDA) that exports event records
21 needs to track which clients are connected to it, in order that it can
22 track which events have been sent to which clients so far. Only once
23 an event has been sent to all monitoring tools that registered an in‐
24 terest can the event be discarded and any memory reclaimed.
25
26 The PMDA(3) library provides callback routines for PMDA developers to
27 provide custom handling of client connections and disconnections. If
28 the PMDA is making use of the event queueing mechanism provided by pm‐
29 daEventNewQueue(3) and friends, client connections and disconnections
30 must be tracked via calls to pmdaEventNewClient and pmdaEventEndClient
31 respectively. This allows the library to keep track of when events can
32 be discarded from a queue, for example, for the context specified.
33 This parameter is passed into the e_endCallBack function directly, and
34 for other callback functions is available via the e_context field of
35 the pmdaExt structure. Additionally, it can be queried at any time us‐
36 ing pmdaGetContext(3).
37
38 Sometimes it is useful for the PMDA to export a metric indicating the
39 current count of attached clients - this is available using the pm‐
40 daEventClients routine, which will fill in the avp pmAtomValue struc‐
41 ture on behalf of a PMDA fetch callback routine.
42
44 pmdaEventNewArray(3), pmdaEventNewQueue(3), PMAPI(3), PMDA(3) and
45 pmEventFlagsStr(3).
46
47
48
49Performance Co-Pilot PCP PMDAEVENTCLIENT(3)