pmdadaemon(3) - Linux man page
Name
pmdaDaemon - initialize the PMDA to run as a daemon
C Synopsis
#include <pcp/pmapi.h>
#include <pcp/impl.h>
#include <pcp/pmda.h>
- void pmdaDaemon(pmdaInterface *dispatch, int interface, char *name, int domain, char
*logfile, char *helptext);
cc ... -lpcp_pmda -lpcp
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:
- name
The name of the agent.
domain
The default domain number of the agent which uniquely identifies this PMDA from other running PMDAs. This may be subsequently changed by a command line option -d (see pmdagetopt(3)).
logfile
The default path to the log file. This may be replaced by the -l command line option if using pmdaGetOpt.
helptext
The default path to the help text (see pmdatext(3). This may be replaced by the -h command line option if using pmdagetopt(3). If no help text is installed, or you are not using pmdatext(3), then this should be set to NULL.
- The callbacks are initialized to pmdaprofile(3), pmdafetch(3), pmdadesc(3), pmdatext(3), pmdainstance(3) and pmdastore(3).
Diagnostics
Unable to allocate memory for pmdaExt structure
In addition, the dispatch->status field is set to a value less than zero.
- PMDA interface version interface not supported
The interface version is not supported by pmdaDaemon.
Caveat
The PMDA must be using PMDA_INTERFACE_2 or later.
See Also
pmapi(3), pmda(3), pmdadso(3), pmdagetopt(3) and pmdatext(3).