Provided by: libpcp3-dev_6.3.8-1_amd64 bug

NAME

       pmPrintValue - print a performance metric value

C SYNOPSIS

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

       void pmPrintValue(FILE *f, int valfmt, int type, const pmValue *val, int minwidth);

       cc ... -lpcp

DESCRIPTION

       The  value  of  a  single performance metric (as identified by val) is printed on the standard I/O stream
       identified by f.

       The value of the performance metric is interpreted according to the format of val as  defined  by  valfmt
       (from  a  pmValueSet within a pmResult structure; see pmFetch(3)) and the generic description of the met‐
       rics type passed in via type.

       The value for type is typically extracted from a pmDesc structure, following a  call  to  pmLookupDesc(3)
       for a particular performance metric.

       The output will be optionally padded to be at least minwidth characters wide.

       pmPrintValue is most useful for displaying values of performance metrics from pmFetch(3) (which returns a
       set  of valfmt and val pairs for each requested metric), based upon the metrics type as returned from pm‐
       LookupDesc(3).

ENVIRONMENT

       Output of string metric values can be further controlled using PCP_SQUASH_NEWLINES.  When set in the  en‐
       vironment  of  the  calling process, and the type is set to PM_TYPE_STRING or PM_TYPE_AGGREGATE, then the
       output value is guaranteed to be free of embedded newline characters.  If the given value contained  such
       characters, they will have been replaced by a space before being printed.

SEE ALSO

       PMAPI(3),  pmAtomStr(3), pmConvScale(3), pmExtractValue(3), pmFetch(3), pmLookupDesc(3), pmTypeStr(3) and
       pmUnitsStr(3).

Performance Co-Pilot                                   PCP                                       PMPRINTVALUE(3)