pmprintvalue(3) - Linux man page
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 metrics 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 pmlookupdesc(3).
See Also
pmapi(3), pmatomstr(3), pmconvscale(3), pmextractvalue(3), pmfetch(3), pmlookupdesc(3), pmtypestr(3) and pmunitsstr(3).