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

NAME

6       pmdaInstance - return instance descriptions for a PMDA
7

C SYNOPSIS

9       #include <pcp/pmapi.h>
10       #include <pcp/impl.h>
11       #include <pcp/pmda.h>
12
13       int  pmdaInstance(pmInDom  indom,  int  inst,  char *name, __pmInResult
14       **result, pmdaExt *pmda);
15
16       cc ... -lpcp_pmda -lpcp
17

DESCRIPTION

19       pmdaInstance uses the standard PMDA(3) data structures to return infor‐
20       mation concerning the instance domain indom.
21
22       The  result  structure  is constructed by pmdaInstance and will contain
23       one or more instance names and/or identifiers as specified by the  inst
24       and name arguments.
25
26       If inst has the value PM_IN_NULL and name is a null string, result will
27       contain all the instances names and identifiers in the instance domain.
28
29       If inst is PM_IN_NULL but name is  the  name  of  an  instance  in  the
30       instance domain indom, then result will contain the instance identifier
31       for instance name.  Note that  if  name  contains  no  spaces,  partial
32       matching  up to the first space in the instance name is performed, i.e.
33       ``1'' will match instance name  ``1  minute''.   If  name  contains  an
34       embedded  space, then no partical matching is performed and name should
35       match one of the instance names exactly.
36
37       If name is a null string but inst is  an  instance  identifier  in  the
38       instance  domain  indom, then result will contain the name for instance
39       inst.  The result structure is allocated with malloc(3) and  should  be
40       released by the caller with free(3).
41

DIAGNOSTICS

43       If  any  errors  occur during the execution of pmdaInstance, the result
44       structure is deallocated.  If the instance domain  indom  is  not  sup‐
45       ported by the PMDA, pmdaInstance will return PM_ERR_INDOM.
46
47       If  the  inst or name does not correspond to any instances in the indom
48       domain, pmdaInstance will return PM_ERR_INST.
49

CAVEAT

51       The PMDA must be using PMDA_INTERFACE_2 or later, as specified  in  the
52       call to pmdaDSO(3) or pmdaDaemon(3).
53
54       Because  of  optional  partial  matching  up  to the first space in the
55       instance name, the PMDA developer should ensure that if instance  names
56       are allowed to have spaces, the names are unique up to the first space.
57

SEE ALSO

59       malloc(3), PMAPI(3), PMDA(3) and pmGetInDom(3).
60
61
62
63Performance Co-Pilot                  SGI                      PMDAINSTANCE(3)
Impressum