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

NAME

6       pmaRewriteData - try to change the version of an archive data record
7

C SYNOPSIS

9       #include <pcp/pmapi.h>
10       #include <pcp/libpcp.h>
11       #include <pcp/archive.h>
12
13       int pmaRewriteData(int invers, int outvers __int32_t *rbuf);
14
15       cc ... -lpcp_archive -lpcp
16

CAVEAT

18       This  documentation is intended for internal Performance Co-Pilot (PCP)
19       developer use.
20
21       These interfaces are not part of the PCP APIs that  are  guaranteed  to
22       remain  fixed  across  releases,  and they may not work, or may provide
23       different semantics at some point in the future.
24

DESCRIPTION

26       A physical data record from a version invers archive is passed  in  via
27       rbuf and this is reformatted if required to produce the equivalent data
28       record for a version outvers archive.
29
30       Archive data records provide the encoding of a pmResult for an  archive
31       data volume.
32
33       The  only  sane choice of invers and outvers today is PM_LOG_VERS02 and
34       PM_LOG_VERS03 respectively, which would be requesting  a  rewrite  from
35       archive  version 2 format to archive version 3 format (as only versions
36       2 and 3 are currently supported).
37
38       If rewriting takes place the old rbuf will have been free'd and  a  new
39       rbuf  allocated  with  malloc(3).  It is the caller's responsibility to
40       make sure this potential free-and-allocate will be safe, e.g.  no  dan‐
41       gling  references  into  the contents of rbuf, or pass in a copy of the
42       record if it is precious.
43

DIAGNOSTICS AND RETURN VALUES

45       In several places, fatal errors will trigger an error message and force
46       the application to exit.
47
48       If  there  is  no  defined  translation  from  invers  to  outvers then
49       pmaRewriteData returns PM_ERR_APPVERSION (a slight perversion  of  this
50       error code).
51
52       If  no  rewrite is performed, the return value is 0, otherwise a return
53       value of 1 indicates a rewrite has taken place and rbuf  has  been  re‐
54       allocated.
55

SEE ALSO

57       free(3), malloc(3), PMAPI(3), and pmaRewriteMeta(3).
58
59
60
61Performance Co-Pilot                  PCP                    PMAREWRITEDATA(3)
Impressum