---
name: "pmprintvalue"
section: "3"
platform: "linux"
package: "libpcp3-dev"
version: "4.3.2+really4.3.1-0.1"
release: "Debian 10 (Buster)"
platforms: ["linux"]
url: "https://new.carta.tech/pmPrintValue"
---

# pmprintvalue(3)

print a performance metric value

Part of [pmPrintValue(3)](/pmPrintValue/3.md).

## 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)](/pmFetch/3.md)) and the generic description of the metrics type passed in via *type*.

The value for *type* is typically extracted from a *pmDesc* structure, following a call to [**pmLookupDesc**(3)](/pmLookupDesc/3.md) 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)](/pmFetch/3.md) (which returns a set of *valfmt* and *val* pairs for each requested metric), based upon the metrics type as returned from [**pmLookupDesc**(3)](/pmLookupDesc/3.md).

## SEE ALSO

[**PMAPI**(3)](/PMAPI/3.md), [**pmAtomStr**(3)](/pmAtomStr/3.md), [**pmConvScale**(3)](/pmConvScale/3.md), [**pmExtractValue**(3)](/pmExtractValue/3.md), [**pmFetch**(3)](/pmFetch/3.md), [**pmLookupDesc**(3)](/pmLookupDesc/3.md), [**pmTypeStr**(3)](/pmTypeStr/3.md) and [**pmUnitsStr**(3)](/pmUnitsStr/3.md).
