1PMATOMSTR(3)               Library Functions Manual               PMATOMSTR(3)
2
3
4

NAME

6       pmAtomStr - convert a performance metric value into a string
7

C SYNOPSIS

9       #include <pcp/pmapi.h>
10
11       const char *pmAtomStr(const pmAtomValue *avp, int type)
12
13       cc ... -lpcp
14

DESCRIPTION

16       All  performance  metric  values may be encoded in a pmAtomValue union,
17       defined as follows;
18
19            typedef union {
20                __int32_t    l;     /* 32-bit signed */
21                __uint32_t   ul;    /* 32-bit unsigned */
22                __int64_t    ll;    /* 64-bit signed */
23                __uint64_t   ull;   /* 64-bit unsigned */
24                float        f;     /* 32-bit floating point */
25                double       d;     /* 64-bit floating point */
26                char         *cp;   /* char ptr */
27                void         *vp;   /* void ptr */
28            } pmAtomValue;
29
30       Given the performance metric value pointed to by avp, and a performance
31       metric type defined by type, generate the corresponding metric value as
32       a string, suitable for diagnostic or report output.
33
34       The value for type is typically extracted from a pmDesc structure, fol‐
35       lowing a call to pmLookupDesc(3) for a particular performance metric.
36
37       If  the type is PM_TYPE_STRING values longer than 38 characters will be
38       truncated after 34  characters,  and  truncation  shown  with  ellipsis
39       ``...'' at the end of the value.
40
41       If  the type is PM_TYPE_AGGREGATE only the first three 32-bit words are
42       displayed as hexadecimal values.
43
44       The string value is held in a single static  buffer,  so  the  returned
45       value is only valid until the next call to pmAtomStr.
46

SEE ALSO

48       PMAPI(3),  pmConvScale(3), pmExtractValue(3), pmLookupDesc(3), pmPrint‐
49       Value(3), pmTypeStr(3) and pmUnitsStr(3).
50
51
52
53Performance Co-Pilot                  SGI                         PMATOMSTR(3)
Impressum