1PMSEMSTR(3) Library Functions Manual PMSEMSTR(3)
2
3
4
6 pmSemStr, pmSemStr_r - convert a performance metric semantic into a
7 string
8
10 #include <pcp/pmapi.h>
11
12 const char *pmSemStr(int sem);
13 char *pmSemStr_r(int sem, char *buf, int buflen);
14
15 cc ... -lpcp
16
18 Given a performance metric semantic, pmSemStr produces a terse ASCII
19 equivalent, appropriate for use in error and diagnostic messages. The
20 pmSemStr_r function does the same, but stores the result in a user-sup‐
21 plied buffer buf of length buflen, which should have room for at least
22 20 bytes.
23
24 The value for sem is typically extracted from a pmDesc structure, fol‐
25 lowing a call to pmLookupDesc(3) for a particular performance metric.
26
27 Examples are counter (for sem equals PM_SEM_COUNTER), discrete (for sem
28 equals PM_SEM_DISCRETE), instant (for sem equals PM_SEM_INSTANT), etc.
29
31 Both of these routines are safe to call from threaded applications.
32
34 PMAPI(3), pmAtomStr(3), pmConvScale(3), pmExtractValue(3), pm‐
35 LookupDesc(3), pmPrintValue(3), pmIDStr(3), pmInDomStr(3), pmTypeStr(3)
36 and pmUnitsStr(3).
37
38
39
40Performance Co-Pilot PCP PMSEMSTR(3)