pmdaDaemon (3) - Linux Manuals
pmdaDaemon: initialize the PMDA to run as a daemon
NAME
pmdaDaemon - initialize the PMDA to run as a daemonC SYNOPSIS
#include <pcp/pmapi.h>#include <pcp/impl.h>
#include <pcp/pmda.h>
The callbacks are initialized to
pmdaProfile(3),
pmdaFetch(3),
pmdaDesc(3),
pmdaText(3),
pmdaInstance(3)
and
pmdaStore(3).
Once
pmdaDaemon
has been called, it is expected that the
pmdaInterface
structure pointed to by
dispatch
will remain accessible to the
routines in
libpcp_pmda
(not reclaimed off the stack,
not freed or oherwise released, etc.).
If the caller needs to move or relocate the
pmdaInterface
structure for any reason, then after the move
pmdaInterfaceMoved(3)
must be called to resestablish the internal integrity of the
pmdaInterface
structure at the new location before any other routine in
libpcp_pmda
is called.
void pmdaDaemon(pmdaInterface *dispatch, int interface, char DESCRIPTION
pmdaDaemon
initializes the
pmdaInterface
structure to use the
interface
extensions assuming the
PMDA(3)
is to be run as a daemon. The
pmdaInterface
structure is initialized with:
DIAGNOSTICS
CAVEAT
The PMDA must be using
PMDA_INTERFACE_2
or later.