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

NAME

6       pmdaEventNewClient, pmdaEventEndClient, pmdaEventClients - client con‐
7       text tracking interfaces for event queues
8

C SYNOPSIS

10       #include <pcp/pmapi.h>
11       #include <pcp/impl.h>
12       #include <pcp/pmda.h>
13
14       int pmdaEventNewClient(int context);
15       int pmdaEventEndClient(int context);
16       int pmdaEventClients(pmAtomValue *avp);
17
18       cc ... -lpcp_pmda -lpcp
19

DESCRIPTION

21       A Performance Metrics Domain Agent (PMDA) that  exports  event  records
22       needs  to track which clients are connected to it, in order that it can
23       track which events have been sent to which clients so far.   Only  once
24       an  event  has been sent to all monitoring tools that registered an in‐
25       terest can the event be discarded and any memory reclaimed.
26
27       The PMDA(3) library provides callback routines for PMDA  developers  to
28       provide  custom  handling of client connections and disconnections.  If
29       the PMDA is making use of the event queueing mechanism provided by  pm‐
30       daEventNewQueue(3)  and  friends, client connections and disconnections
31       must be tracked via calls to pmdaEventNewClient and  pmdaEventEndClient
32       respectively.  This allows the library to keep track of when events can
33       be discarded from a queue, for  example,  for  the  context  specified.
34       This  parameter is passed into the e_endCallBack function directly, and
35       for other callback functions is available via the  e_context  field  of
36       the pmdaExt structure.  Additionally, it can be queried at any time us‐
37       ing pmdaGetContext(3).
38
39       Sometimes it is useful for the PMDA to export a metric  indicating  the
40       current  count  of  attached  clients - this is available using the pm‐
41       daEventClients routine, which will fill in the avp  pmAtomValue  struc‐
42       ture on behalf of a PMDA fetch callback routine.
43

SEE ALSO

45       pmdaEventNewArray(3),   pmdaEventNewQueue(3),   PMAPI(3),  PMDA(3)  and
46       pmEventFlagsStr(3).
47
48
49
50Performance Co-Pilot                  PCP                   PMDAEVENTCLIENT(3)
Impressum