1PMUNITSSTR(3) Library Functions Manual PMUNITSSTR(3)
2
3
4
6 pmUnitsStr - convert a performance metric's units into a string
7
9 #include <pcp/pmapi.h>
10
11 const char *pmUnitsStr(const pmUnits *pu)
12
13 cc ... -lpcp
14
16 The encoding of a performance metric's dimensionality and scale uses a
17 pmUnits structure; see pmLookupDesc(3).
18
19 As an aid to labeling graphs and tables, or for error messages, pmU‐
20 nitsStr will take a dimension and scale specification as per pu, and
21 return the corresponding text string.
22
23 For example {1, -2, 0, PM_SPACE_MBYTE, PM_TIME_SEC, 0}, as the value of
24 *pu gives the result string Mbyte / sec^2.
25
26 The string value is held in a single static buffer, so the returned
27 value is only valid until the next call to pmUnitsStr.
28
29 If the ``count'' dimension is non-zero, and the ``count'' scale is not
30 zero, then the text string will include a decimal scaling factor, eg.
31 count x 10^6.
32
33 As a special case, if all components of the dimension are zero, then
34 the ``count'' scale is used to produce the text. If this scale is zero
35 the result is an empty string, otherwise the result is of the form x1
36 0^2.
37
39 PMAPI(3), pmAtomStr(3), pmConvScale(3), pmExtractValue(3),
40 pmLookupDesc(3), pmPrintValue(3) and pmTypeStr(3).
41
42
43
44Performance Co-Pilot SGI PMUNITSSTR(3)