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.  pm‐
33       Store 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

DIAGNOSTICS

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

SEE ALSO

62       PMAPI(3), pmFetch(3) and pmSetMode(3).
63
64
65
66Performance Co-Pilot                  PCP                           PMSTORE(3)
Impressum