1PMADDDERIVEDTEXT(3)        Library Functions Manual        PMADDDERIVEDTEXT(3)
2
3
4

NAME

6       pmAddDerivedText - add help text for a derived metric
7

C SYNOPSIS

9       #include <pcp/pmapi.h>
10
11       int pmAddDerivedText(const char *name, int type, const char *text);
12
13       cc ... -lpcp
14

DESCRIPTION

16       Derived metrics provide a way of extending the Performance Metrics Name
17       Space (PMNS) with new metrics defined at the PCP client-side using  ex‐
18       pressions  over  the existing performance metrics.  Global derived met‐
19       rics are defined using  pmRegisterDerived(3)  or  pmRegisterDerivedMet‐
20       ric(3)  or  pmLoadDerivedConfig(3), and per-context derived metrics are
21       defined using pmAddDerived(3) or pmAddDerivedMetric(3).
22
23       Once a derived metric has been defined, pmAddDerivedText may be used to
24       associate the help text with the derived metric identified by name.
25
26       Help  text  may  be  a  ``one line'' summary or a more verbose ``multi-
27       line''  block  of  text,  and  type  should   be   PM_TEXT_ONELINE   or
28       PM_TEXT_HELP  respectively.  To associate both styles of help text with
29       a derived metric, pmAddDerivedText would need to be called  twice  with
30       different values for type.
31
32       Once  a particular type of help text has been associated with a derived
33       metric it cannot be deleted or redefined.
34
35       Applications using the Performance Metrics Application Programming  In‐
36       terface (PMAPI) are able to retrieve help text for specific metrics us‐
37       ing pmLookupText(3).
38

DIAGNOSTICS

40       pmAddDerivedText returns zero on success, else an error code.
41
42       The return value PM_ERR_NAME indicates name does not  correspond  to  a
43       previously defined derived metric.
44
45       Repeated calls for the same name and type will result a return value of
46       PM_ERR_TEXT.
47
48       A return value of PM_ERR_ARG indicates that type is not one of the  ex‐
49       pected values.
50

SEE ALSO

52       PCPIntro(1),  pmAddDerived(3), pmAddDerivedMetric(3), PMAPI(3), pmLoad‐
53       DerivedConfig(3),  pmLookupText(3),  pmRegisterDerived(3),  pmRegister‐
54       DerivedMetric(3) and PMNS(5).
55
56
57
58Performance Co-Pilot                                       PMADDDERIVEDTEXT(3)
Impressum