1PMLOOKUPTEXT(3) Library Functions Manual PMLOOKUPTEXT(3)
2
3
4
6 pmLookupText, pmRequestText, pmReceiveText - return text describing a
7 performance metric
8
10 #include <pcp/pmapi.h>
11
12 int pmLookupText(pmID pmid, int level, char **buffer)
13 int pmRequestText(int ctx, pmID pmid, int level)
14 int pmReceiveText(int ctx, char **buffer)
15
16 cc ... -lpcp
17
19 Provided the source of metrics from the current Performance Metrics
20 Application Programming Interface (PMAPI) context is a host, retrieve
21 descriptive text about the performance metric identified by pmid.
22
23 The argument level should be PM_TEXT_ONELINE for a one-line summary,
24 else PM_TEXT_HELP for a more verbose description, suited to a help dia‐
25 log.
26
27 The space pointed to by buffer will have been allocated in pmLookupText
28 with malloc(3C), and it is the responsibility of the caller to free(3C)
29 the space when it is no longer required.
30
31 pmLookupText returns zero on success.
32
33 pmRequestText and pmReceiveText are used by applications which must
34 communicate with the PMCD asynchronously. These functions take explict
35 context handle ctx which must refer to a host context (i.e. created by
36 passing PM_CONTEXT_HOST to pmNewContext). pmRequestText sends request
37 to PMCD to provide descriptive text about a metric identified by a PMID
38 and returns without waiting for the response, pmReceiveText reads reply
39 from PMCD. It is the responsibility of the application to make sure the
40 data are ready before calling pmReceiveText to avoid blocking.
41
42 pmReceiveText can be used to receive replies from either pmRequestText
43 or pmRequestInDomText.
44
46 chkhelp(1), newhelp(1), PMAPI(3), pmGetConfig(3), pmLookupDesc(3),
47 pmLookupInDomText(3), pmRequestInDomText(3), pcp.conf(4) and
48 pcp.env(4).
49
51 PM_ERR_NOTHOST
52 if the current PMAPI context is an archive log (help and one-
53 line text is not maintained in the archive logs)
54
55 PM_ERR_CTXBUSY
56 Context is currently in use by another asynchronous call
57
58
59
60Performance Co-Pilot SGI PMLOOKUPTEXT(3)