PMAGETLOG(3)
π PMAGETLOG(3) β the pmaGetLog glow-up π
okay bestie, welcome to the Library Functions Manual for pmaGetLog β yes it's a section 3 page, yes it's internal PCP business, and yes we're gonna read it together like it's a group chat π«Ά
β¨ NAME β¨
pmaGetLog β direct read of the next record from an archive file π
π C SYNOPSIS π
#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
like. the headers. the signature. the link flags. all of it, exactly as written, no notes π
β οΈ CAVEAT β οΈ
bestie. listen. this documentation is intended for internal Performance Co-Pilot (PCP) developer use.
And the real tea: these interfaces are not part of the PCP APIs that are guaranteed to remain fixed across releases. So they may not work, or they may provide different semantics at some point in the future. Not "might", may. Plan accordingly π
πΈ DESCRIPTION πΈ
So this is a cut-down version of __pmLogRead(3) from libpcp, right? And what it does is read the next physical record from the volume vol of the archive identified by acp. Slay.
Here's the vibe check on which record you get:
- If
volisPM_LOG_VOL_META, then the next metadata record is read. - Otherwise, the next record from the data volume
volis read.
The record comes back in rbuf, and listen β rbuf is allocated here. So the caller will have to call free(3) when it is no longer needed. Not me leaving you a little cleanup chore π but yeah, that's yours.
Now the important part, the part where we're lowkey honest about what this function does not do: 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. So don't go reading it like it's local, bestie, it's not π
π¦ DIAGNOSTICS AND RETURN VALUES π¦
- The return value is
0if all is well β¨ - else
PM_ERR_EOLfor end of file π - else some other error code less than zero π
π SEE ALSO π
free(3), pmaPutLog(3), PMAPI(3) and __pmLogRead(3).
and that's the whole page, no cap π
Performance Co-Pilot Β· PCP Β· PMAGETLOG(3) β that's the source and the manual tag, so consider this your cute lil sign-off. mwah. go read your records ππ¦β¨
π¦ where this page comes from
- arch rolling: pcp 7.2.2-2 Β· GPL-2.0-or-later AND LGPL-2.1-or-later AND CC-BY-3.0
- centos-stream 10: pcp-doc 7.1.5-6.el10 Β· GPL-2.0-or-later AND CC-BY-3.0
- fedora 43: pcp-doc 7.0.1-1.fc43 Β· GPL-2.0-or-later AND CC-BY-3.0
- fedora 43: pcp-doc 7.2.1-1.fc43
- fedora 43: pcp-doc 7.2.2-1.fc43
- fedora 43: pcp-doc 7.2.2-2.fc43 Β· GPL-2.0-or-later AND CC-BY-3.0
- fedora 44: pcp-doc 7.1.0-6.fc44 Β· GPL-2.0-or-later AND CC-BY-3.0
- fedora 44: pcp-doc 7.2.1-1.fc44
- fedora 44: pcp-doc 7.2.2-1.fc44
- fedora 44: pcp-doc 7.2.2-2.fc44 Β· GPL-2.0-or-later AND CC-BY-3.0
- ubuntu resolute: libpcp-archive1-dev 7.1.1-1
- ubuntu stonking: libpcp-archive1-dev 7.2.1-2build1
- Copyright (c) 2022 Ken McDonell. All Rights Reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms