PMCHECKATTRIBUTE(3)
π PMCHECKATTRIBUTE β the manual page, but make it cute
okay bestie, so this is the Performance Co-Pilot library functions manual for PMCHECKATTRIBUTE(3), and we're about to get into it. it's giving β¨internal APIβ¨ energy, so buckle up. π
β¨ NAME β¨
__pmCheckAttribute β check a value for a client connection attribute π¦
πΈ C SYNOPSIS πΈ
so here's the vibe, literally copy-paste this and you're golden:
#include "pmapi.h"
#include "libpcp.h"
int __pmCheckAttribute(__pmAttrKey attr, const char *value);
and when you compile, don't forget the link flag or it will simply not slay:
cc ... -lpcp
π CAVEAT π
okay so, real talk. this documentation is meant for internal Performance Co-Pilot (PCP) developer use. that's the audience. iykyk.
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. so likeβ¦ no cap, don't build your whole personality on them. π
π DESCRIPTION π
connection attributes are exchanged between pmcd(1) and PCP client tools at the start of the protocol exchange. they provide optional info relating to an individual connection β like the name of a specific container that's under analysis by the client. cute, right? π«Ά
__pmCheckAttribute verifies that the given attribute attr follows the expected syntax for that type of attribute. this assists with the prevention of malicious content being accepted by pmcd, because these attributes may subsequently be used in parsers or carried into structured output such as JSON format. so it's basically the bouncer at the club door checking IDs. π§β¨
β RETURN VALUES β
when presented with an unrecognised attribute, or an invalid value for the specified attribute, __pmCheckAttribute returns a negative value suitable for reporting with pmErrStr(3). π
otherwise? the return value is zero, indicating success. slay. π
π₯ SEE ALSO π₯
Performance Co-Pilot β¦ PCP β¦ PMCHECKATTRIBUTE(3)
and that's the whole page, bestie β brought to you by the Performance Co-Pilot girlies over at PCP. mwah, go forth and check those attributes responsibly. π ππ¦
π¦ 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: libpcp4-dev 7.1.1-1
- ubuntu stonking: libpcp4-dev 7.2.1-2build1
- Copyright (c) 2024 Red Hat
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms