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

NAME

6       pmLookupInDomText,  pmRequestInDomText  - return text describing a per‐
7       formance metrics instance domain
8

C SYNOPSIS

10       #include <pcp/pmapi.h>
11
12       int pmLookupInDomText(pmInDom indom, int level, char **buffer)
13       int pmRequestInDomText(int ctx, pmInDom indom, int level)
14
15       cc ... -lpcp
16

DESCRIPTION

18       Provided the source of metrics from  the  current  Performance  Metrics
19       Application  Programming  Interface (PMAPI) context is a host, retrieve
20       descriptive text about the performance metrics instance domain  identi‐
21       fied by indom.
22
23       The  value  for the instance domain indom is typically extracted from a
24       pmDesc structure, following a call to pmLookupDesc(3) for a  particular
25       performance metric.
26
27       The  argument  level  should be PM_TEXT_ONELINE for a one-line summary,
28       else PM_TEXT_HELP for a more verbose description, suited to a help dia‐
29       log.
30
31       The  space pointed to by buffer will have been allocated in pmLookupIn‐
32       DomText with malloc(3C), and it is the responsibility of the caller  to
33       free(3C) the space when it is no longer required.
34
35       pmLookupInDomText returns zero on success.
36
37       pmRequestInDomText  and  pmReceiveText  are  used by applications which
38       must  communicate with the PMCD asynchronously.  These  functions  take
39       explict  context  handle  ctx  which must refer to a host context (i.e.
40       created by passing PM_CONTEXT_HOST to pmNewContext). pmRequestInDomText
41       sends  request  to  PMCD  to provide descriptive text about performance
42       metrics instance domain identified by indom and returns without waiting
43       for  the  response,  pmReceiveText  reads  reply  from  PMCD. It is the
44       responsibility of the application to  make  sure  the  data  are  ready
45       before calling pmReceiveText to avoid blocking.
46

SEE ALSO

48       chkhelp(1),   newhelp(1),  PMAPI(3),  pmGetConfig(3),  pmLookupDesc(3),
49       pmLookupText(3), pmReceiveText(3), pcp.conf(4) and pcp.env(4).
50

DIAGNOSTICS

52       PM_ERR_NOTHOST
53              if the current PMAPI context is an archive log  (help  and  one-
54              line text is not maintained in the archive logs)
55
56       PM_ERR_CTXBUSY
57              Context is currently in use by another asynchronous call.
58
59
60
61Performance Co-Pilot                  SGI                 PMLOOKUPINDOMTEXT(3)
Impressum