введение в библиотеку поддержки агента домена Performance Metrics (introduction to the Performance Metrics Domain Agent support library)
DEFAULT CALLBACKS FOR HANDLING PDUs
To allow a consistent framework, pmdaMain(3) can be used by a
daemon PMDA to handle the communication protocol using the same
callbacks as a DSO PMDA. The structure pmdaInterface
is used to
convey the common procedural interface and state information that
is used by pmcd(1) and a PMDA. This state information includes
tables describing the supported metrics and instance domains.
As most of the procedural interface is identical for all PMDAs,
they are provided as part of this support library
(pmdaProfile(3), pmdaFetch(3), pmdaInstance(3), pmdaDesc(3),
pmdaText(3) and pmdaStore(3)). However, these routines require
access to the pmdaInterface
state information so it must be
correctly initialized using pmdaConnect(3), pmdaDaemon(3),
pmdaOpenLog(3), pmdaDSO(3), pmdaGetOpt(3) and pmdaInit(3).