введение в библиотеку поддержки агента домена Performance Metrics (introduction to the Performance Metrics Domain Agent support library)
DSO PMDA
A PMDA that is run as a DSO is opened by pmcd(1) with dlopen(3).
pmcd(1) will call the PMDA's initialization function that is
specified in $PCP_PMCDCONF_PATH. This function is passed a
pointer to a pmdaInterface
structure which must be completed.
Any callbacks which are not the default PMDA support library
callbacks must be specified in the pmdaInterface
structure.
The simple PMDA
uses its own store and fetch callback.
simple_fetch
() calls pmdaFetch(3) which requires a callback to be
set with pmdaSetFetchCallBack(3) as can be seen in
$PCP_PMDAS_DIR/simple/simple.c.
The flag _isDSO
is used to determine if the PMDA is a daemon or a
DSO so that the correct initialization routine, pmdaDaemon(3) or
pmdaDSO(3), is called.