Product SiteDocumentation Site

3.8.3. PMAPI Instance Domain Services

The functions described in this section provide Performance Metrics Application Programming Interface (PMAPI) instance domain services.  pmGetInDom Function

int pmGetInDom(pmInDom indom, int **instlist, char ***namelist)
([instance1, instance2...] [name1, name2...]) pmGetInDom(pmDesc pmdesc)
In the current PMAPI context, locate the description of the instance domain indom, and return through instlist the internal instance identifiers for all instances, and through namelist the full external identifiers for all instances. The number of instances found is returned as the function value (or less than zero to indicate an error).
The resulting lists of instance identifiers (instlist and namelist), and the names that the elements of namelist point to, are allocated by pmGetInDom with two calls to malloc, and it is the responsibility of the caller to use free(instlist) and free(namelist) to release the space when it is no longer required. When the result of pmGetInDom is less than one, both instlist and namelist are undefined (no space is allocated, and so calling free is a bad idea); see the malloc(3) and free(3) man pages.
The python bindings return a tuple of the instance identifiers and instance names for an instance domain pmdesc.