pmagetlog(3) — Linux manual page

NAME | C SYNOPSIS | CAVEAT | DESCRIPTION | DIAGNOSTICS AND RETURN VALUES | SEE ALSO | COLOPHON

PMAGETLOG(3)            Library Functions Manual            PMAGETLOG(3)

NAME         top

       pmaGetLog - direct read of the next record from an archive file

C SYNOPSIS         top

       #include <pcp/pmapi.h>
       #include <pcp/libpcp.h>
       #include <pcp/archive.h>

       int pmaGetLog(__pmArchCtl *acp, int vol, __int32_t **rbuf);

       cc ... -lpcp_archive -lpcp

CAVEAT         top

       This documentation is intended for internal Performance Co-Pilot
       (PCP) developer use.

       These interfaces are not part of the PCP APIs that are guaranteed
       to remain fixed across releases, and they may not work, or may
       provide different semantics at some point in the future.

DESCRIPTION         top

       This is a cut-down version of __pmLogRead(3) from libpcp, that
       reads the next physical record from the volume vol of the archive
       identified by acp.

       If vol is PM_LOG_VOL_META then the next metadata record is read,
       otherwise the next record from the data volume vol is read.

       The record is returned in rbuf which is allocated here; so the
       caller will have to call free(3) when it is no longer needed.

       The record header length and trailer length is checked, but
       otherwise rbuf is not processed, and in particular the record
       remains in network byte-order.

DIAGNOSTICS AND RETURN VALUES         top

       The return value is 0 if all is well, else PM_ERR_EOL for end of
       file, else some other error code less than zero.

SEE ALSO         top

       free(3), pmaPutLog(3), PMAPI(3) and __pmLogRead(3).

COLOPHON         top

       This page is part of the PCP (Performance Co-Pilot) project.
       Information about the project can be found at 
       ⟨http://www.pcp.io/⟩.  If you have a bug report for this manual
       page, send it to [email protected].  This page was obtained from the
       project's upstream Git repository
       ⟨https://github.com/performancecopilot/pcp.git⟩ on 2024-06-14.
       (At that time, the date of the most recent commit that was found
       in the repository was 2024-06-14.)  If you discover any rendering
       problems in this HTML version of the page, or you believe there
       is a better or more up-to-date source for the page, or you have
       corrections or improvements to the information in this COLOPHON
       (which is not part of the original manual page), send a mail to
       [email protected]

Performance Co-Pilot               PCP                      PMAGETLOG(3)

Pages that refer to this page: pmaputlog(3)