PMCHECKATTRIBUTE(3)

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

πŸ’… 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