1PMAGETLOG(3) Library Functions Manual PMAGETLOG(3)
2
3
4
6 pmaGetLog - direct read of the next record from an archive file
7
9 #include <pcp/pmapi.h>
10 #include <pcp/libpcp.h>
11 #include <pcp/archive.h>
12
13 int pmaGetLog(__pmArchctl *acp, int vol, __int32_t **rbuf);
14
15 cc ... -lpcp_archive -lpcp
16
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
26 This is a cut-down version of __pmLogRead(3) from libpcp, that reads
27 the next physical record from the volume vol of the archive identified
28 by acp.
29
30 If vol is PM_LOG_VOL_META then the next metadata record is read, other‐
31 wise the next record from the data volume vol is read.
32
33 The record is returned in rbuf which is allocated here; so the caller
34 will have to call free(3) when it is no longer needed.
35
36 The record header length and trailer length is checked, but otherwise
37 rbuf is not processed, and in particular the record remains in network
38 byte-order.
39
41 The return value is 0 if all is well, else PM_ERR_EOL for end of file,
42 else some other error code less than zero.
43
45 free(3), pmaPutLog(3), PMAPI(3) and __pmLogread(3).
46
47
48
49Performance Co-Pilot PCP PMAGETLOG(3)