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

NAME

6       pmFetchArchive - get performance metrics directly from an archive log
7

C SYNOPSIS

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

DESCRIPTION

16       pmFetchArchive  is  a  variant of pmFetch(3) that may only be used when
17       the  current  Performance  Metrics  Application  Programming  Interface
18       (PMAPI) context is associated with an archive log.
19
20       The result is instantiated with all of the metrics (and instances) from
21       the next archive record, consequently there is no notion of a  list  of
22       desired  metrics,  and  the  instance  profile  of the PMAPI context is
23       ignored.
24
25       It is expected that pmFetchArchive would be used  to  create  utilities
26       that  scan  archive  logs, while the more common access to the archives
27       would be via the pmFetch(3) interface.
28
29       To skip records within the archive log, use pmSetMode(3) to change  the
30       collection   time   within   the   current  PMAPI  context,  then  call
31       pmFetchArchive.
32
33       Note that the result returned by pmFetchArchive  is  dynamically  allo‐
34       cated,  and  must be released using pmFreeResult(3), not free(3C).  See
35       pmFetch(3) and pmFreeResult(3) for further details.
36
37       pmFetchArchive returns zero on success.
38

SEE ALSO

40       PMAPI(3), pmFetch(3),  pmFreeResult(3),  pmNewContext(3),  pmSetMode(3)
41       and pmTrimNameSpace(3).
42

DIAGNOSTICS

44       PM_ERR_NOTARCHIVE
45              the current PMAPI context is not associated with an archive log
46
47
48
49Performance Co-Pilot                  SGI                    PMFETCHARCHIVE(3)
Impressum