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

NAME

6       pmStore, pmStoreHighRes - modify values of performance metrics
7

C SYNOPSIS

9       #include <pcp/pmapi.h>
10
11       int pmStore(const pmResult *result);
12       int pmStoreHighRes(const pmHighResResult *result);
13
14       cc ... -lpcp
15

DESCRIPTION

17       In some special cases it may be helpful to modify the current values of
18       performance metrics, e.g. to reset a counter to zero, or  to  modify  a
19       ``metric''  which  is a control variable for some agent collecting per‐
20       formance metrics.
21
22       The routines pmStore and pmStoreHighRes are lightweight inverses of pm‐
23       Fetch(3) and pmFetchHighRes(3) respectively.
24
25       The  caller must build the result data structure (of course, this could
26       have been returned from  an  earlier  pmFetch(3)  or  pmFetchHighRes(3)
27       call).
28
29       It  is  an error to pass a result to pmStore or pmStoreHighRes in which
30       the numval field within any of the pmValueSet structures  has  a  value
31       less than one.
32
33       The  current  Performance  Metrics  Application  Programming  Interface
34       (PMAPI) context must be one with a host as the source of  metrics,  and
35       the  current  value of the nominated metrics will be changed, i.e.  pm‐
36       Store and pmStoreHighRes cannot be used to make  retrospective  changes
37       to  information  in  either the archive logs, or in the recent past for
38       real-time sources of metrics.
39
40       The return code from pmStore and pmStoreHighRes is zero for success.
41

DIAGNOSTICS

43       PM_ERR_GENERIC
44              At least one of the modifications was rejected.  No other status
45              is  available from below the PMAPI (this is the lightweight part
46              of the functionality!).  In cases where the outcome  of  storing
47              into individual metrics is important, the caller should make one
48              call to either pmStore or pmStoreHighRes for  each  metric.   On
49              the other hand, a bulk modification can be performed in a single
50              call for situations in which the outcome is not critical.
51
52       PM_ERR_NOTHOST
53              The current PMAPI context is an archive rather than a  host,  or
54              it  is a host that is not set to the current time, i.e. has been
55              ``rewound'' to the recent past using pmSetMode(3) or  pmSetMode‐
56              HighRes(3).
57
58       PM_ERR_TOOSMALL
59              The number of metrics specified in result is less than one.
60
61       PM_ERR_VALUE
62              One or more of the pmValueSets in result has a numval field with
63              a value less than one.
64

SEE ALSO

66       PMAPI(3), pmFetch(3), pmFetchHighRes(3), pmSetModeHighRes(3) and pmSet‐
67       Mode(3).
68
69
70
71Performance Co-Pilot                  PCP                           PMSTORE(3)
Impressum