DOKK / manpages / debian 12 / libpcp3-dev / pmSetDerivedControl.3.en
PMDERIVEDCONTROL(3) Library Functions Manual PMDERIVEDCONTROL(3)

pmGetDerivedControl, pmSetDerivedControl - get and set controls for derived metrics

#include <pcp/pmapi.h>

int pmGetDerivedControl(int what, int *valuep);
int pmSetDerivedControl(int what, int value);

cc ... -lpcp

These routines may be used to influence the behaviour of the derived metric services that are activated for global derived metrics using pmRegisterDerived(3), pmRegisterDerivedMetric(3) and pmLoadDerivedConfig(3), or per-context derived metrics using pmAddDerived(3) and pmAddDerivedDerived(3).

The what argument selects a control, the value argument provides a value for pmSetDerivedControl and the valuep argument is used to return the value for pmGetDerivedControl.

The what argument has one of the following values:

The maximum number of global derived metrics that may be defined. The value -1 indicates no limit.
The maximum number of per-context derived metrics that may be defined. The value -1 indicates no limit.
Debug diagnostics during parsing of derived metric expression. The value 1 enables the diagnostics, the value 0 disables them.
Debug diagnostics for semantic checks during the binding of metrics in the derived metric expression to the available metrics in a new PMAPI context. The value 1 enables the diagnostics, the value 0 disables them.
Debug diagnostics when derived metrics are used in PMAPI operations like pmFetch(3), pmGetChildren(3), pmGetChildrenStatus(3), pmLookupDesc(3), pmLookupName(3), pmNameAll(3), pmNameID(3) and pmTraversePMNS(3).

Both routines return 0 on success, else a value less than 0 that can be decoded using pmErrStr(3).

PCPIntro(1), pmAddDerived(3), pmAddDerivedMetric(3), PMAPI(3), pmErrStr(3), pmLoadDerivedConfig(3), pmRegisterDerived(3), pmRegisterDerivedMetric(3) and PMNS(5).

Performance Co-Pilot