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

NAME

6       pmLoadDerivedConfig - load derived metric definitions from a file
7

C SYNOPSIS

9       #include <pcp/pmapi.h>
10
11       int pmLoadDerivedConfig(char *fname)
12
13       cc ... -lpcp
14

DESCRIPTION

16       Each  line  of the file fname is either a comment line (with a ``#'' in
17       the first position of the line) or the declaration of a derived perfor‐
18       mance metric, specified as:
19
20       * the  name of the derived metric, using the same ``dot notation'' syn‐
21         tax that is used for PCP performance  metrics,  see  PCPIntro(1)  and
22         pmns(4).
23
24       * an equals sign (``='')
25
26       * a  valid expression for a derived metric, as described in pmRegister‐
27         Derived(3).
28
29       White space is ignored in the lines.
30
31       For each line containing a derived metric  definition,  BR  pmRegister‐
32       Derived (3) is called to register the new derived metric.
33
34       The  result from pmLoadDerivedConfig will be the number of derived met‐
35       rics loaded from fname else a value less than zero in the  case  of  an
36       error.
37

EXAMPLE

39       # sample derived metric definitions
40       bad_in_pkts = network.interface.in.errors + network.interface.in.drops
41       # note the following would need to be on a single line ...
42       disk.dev.read_pct = 100 * delta(disk.dev.read) /
43                   (delta(disk.dev.read) + delta(disk.dev.write))
44

SEE ALSO

46       PCPIntro(1), PMAPI(3) and pmRegisterDerived(3).
47
48
49
50Performance Co-Pilot                                    PMLOADDERIVEDCONFIG(3)
Impressum