__pmcheckattribute(3) — Linux manual page

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

PMCHECKATTRIBUTE(3)      Library Functions Manual     PMCHECKATTRIBUTE(3)

NAME         top

       __pmCheckAttribute - check value for a client connection attribute

C SYNOPSIS         top

       #include "pmapi.h"
       #include "libpcp.h"

       int __pmCheckAttribute(__pmAttrKey attr, const char * value);

       cc ... -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

       Connection attributes are exchanged between pmcd(1) and PCP client
       tools at the start of the protocol exchange.  They provide
       optional information relating to an individual connection, such as
       the name of a specific container that is under analysis by the
       client.

       __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 as
       these attributes may subsequently be used in parsers or carried
       into structured output such as JSON format.

RETURN VALUES         top

       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.

SEE ALSO         top

       pmdbg(1), PMAPI(3) and pmErrStr(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 pcp@groups.io.  This page was obtained from the
       project's upstream Git repository
       ⟨https://github.com/performancecopilot/pcp.git⟩ on 2025-02-02.
       (At that time, the date of the most recent commit that was found
       in the repository was 2025-01-30.)  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
       man-pages@man7.org

Performance Co-Pilot               PCP                PMCHECKATTRIBUTE(3)