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

NAME

6       pmStore - modify values of performance metrics
7

C SYNOPSIS

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

DESCRIPTION

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

SEE ALSO

40       PMAPI(3), pmFetch(3) and pmSetMode(3).
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  pmStore
47              for  individual metrics is important, the caller should make one
48              call to pmStore for each metric. On the other hand, a bulk modi‐
49              fication  can  be  performed in a single pmStore call for situa‐
50              tions 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).
56
57       PM_ERR_TOOSMALL
58              The number of metrics specified in result is less than one.
59
60       PM_ERR_VALUE
61              One or more of the pmValueSets in result has a numval field with
62              a value less than one.
63
64
65
66Performance Co-Pilot                  PCP                           PMSTORE(3)
Impressum