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

NAME

6       pmdaDaemon - initialize the PMDA to run as a daemon
7

C SYNOPSIS

9       #include <pcp/pmapi.h>
10       #include <pcp/impl.h>
11       #include <pcp/pmda.h>
12
13       void pmdaDaemon(pmdaInterface *dispatch, int interface, char *name,
14               int domain, char *logfile, char *helptext);
15
16       cc ... -lpcp_pmda -lpcp
17

DESCRIPTION

19       pmdaDaemon initializes the pmdaInterface structure to use the interface
20       extensions  assuming the PMDA(3) is to be run as a daemon.  The pmdaIn‐
21       terface structure is initialized with:
22
23       name           The name of the agent.
24
25       domain         The default domain number of the  agent  which  uniquely
26                      identifies this PMDA from other running PMDAs.  This may
27                      be subsequently changed by a command line option -d (see
28                      pmdaGetOpt(3)).
29
30       logfile        The  default path to the log file.  This may be replaced
31                      by the -l command line option if using pmdaGetOpt.
32
33       helptext       The default path to  the  help  text  (see  pmdaText(3).
34                      This  may  be  replaced by the -h command line option if
35                      using pmdaGetOpt(3).  If no help text is  installed,  or
36                      you  are  not using pmdaText(3), then this should be set
37                      to NULL.
38
39       The callbacks are initialized to pmdaProfile(3), pmdaFetch(3),  pmdaDe‐
40       sc(3), pmdaText(3), pmdaInstance(3) and pmdaStore(3).
41

DIAGNOSTICS

43       Unable to allocate memory for pmdaExt structure
44                      In addition, the dispatch->status field is set to a val‐
45                      ue less than zero.
46
47       PMDA interface version interface not supported
48                      The interface version is not supported by pmdaDaemon.
49

CAVEAT

51       The PMDA must be using PMDA_INTERFACE_2 or later.
52
53       Once pmdaDaemon has been called, it is expected that the  pmdaInterface
54       structure pointed to by dispatch will remain accessible to the routines
55       in libpcp_pmda (not reclaimed off the stack, not freed or oherwise  re‐
56       leased,  etc.).  If the caller needs to move or relocate the pmdaInter‐
57       face structure for any  reason,  then  after  the  move  pmdaInterface‐
58       Moved(3)  must  be called to resestablish the internal integrity of the
59       pmdaInterface structure at the new location before any other routine in
60       libpcp_pmda is called.
61

SEE ALSO

63       PMAPI(3), PMDA(3), pmdaDSO(3), pmdaGetOpt(3), pmdaInterfaceMoved(3) and
64       pmdaText(3).
65
66
67
68Performance Co-Pilot                  PCP                        PMDADAEMON(3)
Impressum