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

NAME

6       pmFetchArchive - get performance metrics directly from a set if archive
7       logs
8

C SYNOPSIS

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

DESCRIPTION

17       pmFetchArchive is a variant of pmFetch(3) that may only  be  used  when
18       the  current  Performance  Metrics  Application  Programming  Interface
19       (PMAPI) context is associated with a set of archive logs.
20
21       The result is instantiated with all of the metrics (and instances) from
22       the  next  archive record, consequently there is no notion of a list of
23       desired metrics, and the instance profile of the PMAPI context  is  ig‐
24       nored.
25
26       pmFetchArchive may return a result in which numpmid is zero.  This is a
27       <mark> record that indicates a temporal discontinuity in the  time  se‐
28       ries  of  performance metrics.  This can happen at the boundary between
29       archive logs in a set or if the archive log associated with the current
30       PMAPI  context  was created using pmlogextract(1) to concatenate two or
31       more PCP archive logs, and the <mark> record marks a point in time  be‐
32       tween  the end of one input archive and the start of the next input ar‐
33       chive.
34
35       It is expected that pmFetchArchive would be used  to  create  utilities
36       that scan sets of archive logs, while the more common access to the ar‐
37       chives would be via the pmFetch(3) interface.
38
39       To skip records within the set of archive  logs,  use  pmSetMode(3)  to
40       change  the collection time within the current PMAPI context, then call
41       pmFetchArchive.
42
43       Note that the result returned by pmFetchArchive  is  dynamically  allo‐
44       cated,  and  must  be released using pmFreeResult(3), not free(3).  See
45       pmFetch(3) and pmFreeResult(3) for further details.
46
47       pmFetchArchive returns zero on success.
48

DIAGNOSTICS

50       PM_ERR_NOTARCHIVE
51              the current PMAPI context is not associated with a  set  of  ar‐
52              chive logs
53

SEE ALSO

55       PMAPI(3),  pmFetch(3),  pmFreeResult(3),  pmNewContext(3), pmSetMode(3)
56       and pmTrimNameSpace(3).
57
58
59
60Performance Co-Pilot                  PCP                    PMFETCHARCHIVE(3)
Impressum