PMLOGWRITEMARK(3)

πŸ“¦
version 7.2.2 Β· 4 versions
, in arch rolling, centos-stream 10, fedora 43, fedora 44, ubuntu resolute, ubuntu stonking

πŸ’– PMLOGWRITEMARK(3) β€” the internal mark-writer glow-up πŸ’–

okay bestie, so this one lives in the Library Functions Manual section of the PCP docs, and it's giving deep internals energy, so buckle up πŸŽ€


✨ NAME ✨

__pmLogWriteMark β€” appends a <mark> record to a PCP archive, periodt πŸ’…


🌸 C SYNOPSIS 🌸

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

int __pmLogWriteMark(__pmArchCtl *acp, const __pmTimestamp *last_stamp,
                     const __pmTimestamp *inc);

cc ... -lpcp

🚨 CAVEAT 🚨

okay so real talk, this doc is for internal Performance Co-Pilot (PCP) developer use only, no cap πŸ™ˆ

These interfaces are not part of the PCP APIs that are guaranteed to remain fixed across releases. And lowkey? At some point in the future they may not work or may provide different semantics. So don't go building your whole personality on them, bestie 😭


πŸ¦‹ DESCRIPTION πŸ¦‹

__pmLogWriteMark appends a <mark> record to the current data file of a PCP archive. A <mark> record literally signals a discontinuity in the time series of logged data in the archive β€” it's the archive's way of going "okay so something wild happened here" ✨ See PCPIntro(1) for more info, iykyk.

The timestamp of the <mark> record is given by last_stamp, optionally incremented by inc β€” unless inc is NULL, in which case no increment is done at all. Simple as that πŸ’…

The current data volume's I/O stream, plus the archive version (which decides the format of the <mark> record), are both determined from acp. She's the main character here πŸ‘‘


⭐ DIAGNOSTICS AND RETURN VALUES ⭐

The return value is 0 if all is well πŸ₯³ β€” otherwise you get some error code less than zero, which you can turn into an actual human-readable error message by calling pmErrStr(3). That's your vibe check translator fr fr 🫢


🌈 SEE ALSO 🌈


πŸŽ€ friendly reminder: internal API, not guaranteed, could change on you. Read the caveat again if you skipped it. I see you. πŸ‘€

and that's the whole page, bestie β€” this one came out of the Performance Co-Pilot source, under the PCP umbrella, dated as of the original PMLOGWRITEMARK(3) release. slay πŸ’–βœ¨

πŸ“¦ where this page comes from