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

NAME

6       pmStore,  pmRequestStore, pmReceiveStore - modify values of performance
7       metrics
8

C SYNOPSIS

10       #include <pcp/pmapi.h>
11
12       int pmStore(const pmResult *result)
13       int pmRequestStore(int ctx, const pmResult *result)
14       int pmReceiveStore(int ctx)
15
16       cc ... -lpcp
17

DESCRIPTION

19       In some special cases it may be helpful to modify the current values of
20       performance  metrics,  e.g.  to reset a counter to zero, or to modify a
21       ``metric'' which is a control variable for some agent  collecting  per‐
22       formance metrics.
23
24       The routine pmStore is a lightweight inverse of pmFetch(3).
25
26       The  caller  must  build  the  pmResult data structure (of course, this
27       could have been returned from an earlier pmFetch(3) call) and then call
28       pmStore.
29
30       It  is  an error to pass a request to pmStore in which the numval field
31       within any of the pmValueSet structure has a value 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.
36       pmStore  cannot be used to make retrospective changes to information in
37       either the archive logs, or in the recent past for real-time sources of
38       metrics.
39
40       The return code from pmStore is zero for success.
41
42       pmRequestStore  and  pmReceiveStore are used by applications which must
43       communicate with the PMCD asynchronously.  These functions take explict
44       context  handle ctx which must refer to a host context (i.e. created by
45       passing PM_CONTEXT_HOST to pmNewContext). pmRequestStore sends  request
46       to  store data in result in the metrics and returns without waiting for
47       the response, pmReceiveStore reads confirmation from PMCD.  It  is  the
48       responsibility  of  the  application  to  make  sure the data are ready
49       before calling pmReceiveStore to avoid blocking.
50

SEE ALSO

52       PMAPI(3), pmFetch(3) and pmSetMode(3).
53

DIAGNOSTICS

55       PM_ERR_GENERIC
56              At least one of the modifications was rejected.  No other status
57              is  available from below the PMAPI (this is the lightweight part
58              of the functionality!).  In cases where the outcome  of  pmStore
59              for  individual metrics is important, the caller should make one
60              call to pmStore for each metric. On the other hand, a bulk modi‐
61              fication  can  be  performed in a single pmStore call for situa‐
62              tions in which the outcome is not critical.
63
64       PM_ERR_NOTHOST
65              The current PMAPI context is an archive rather than a  host,  or
66              it  is a host that is not set to the current time, i.e. has been
67              ``rewound'' to the recent past using pmSetMode(3).
68
69       PM_ERR_TOOSMALL
70              The number of metrics specified in result is less than one.
71
72       PM_ERR_VALUE
73              One or more of the pmValueSets in result has a numval field with
74              a value less than one.
75
76       PM_ERR_CTXBUSY
77              Context is currently in use by another asynchronous call.
78
79
80
81Performance Co-Pilot                  SGI                           PMSTORE(3)
Impressum