1PMADDPROFILE(3) Library Functions Manual PMADDPROFILE(3)
2
3
4
6 pmAddProfile - add instance(s) to the current PMAPI instance profile
7
9 #include <pcp/pmapi.h>
10
11 int pmAddProfile(pmInDom indom, int numinst, int *instlist)
12
13 cc ... -lpcp
14
16 The set of instances for performance metrics returned from a pmFetch(3)
17 call may be filtered or restricted using an instance profile. There is
18 one instance profile for each context the application creates at the
19 Performance Metrics Application Programming Interface (PMAPI(3)), and
20 each instance profile may include instances from one or more instance
21 domains (see pmLookupDesc(3)).
22
23 pmAddProfile may be used to add new instance specifications to the
24 instance profile of the current PMAPI context.
25
26 In the simplest variant, the list of instances identified by the
27 instlist argument for the indom instance domain are added to the
28 instance profile. The list of instance identifiers contains numinst
29 values.
30
31 The indom value would normally be extracted from a call to
32 pmLookupDesc(3) for a particular performance metric, and the instances
33 in instlist would typically be determined by calls to pmGetInDom(3) or
34 pmLookupInDom(3).
35
36 To select all instances in all instance domains, use
37
38 pmAddProfile(PM_INDOM_NULL, 0, (int *)0)
39
40 This is the only case where indom may be equal to PM_INDOM_NULL. If
41 numinst is zero, or instlist is NULL, then all instances in indom are
42 selected.
43
45 PMAPI(3), pmDelProfile(3), pmFetch(3), pmGetInDom(3), pmLookupDesc(3),
46 pmLookupInDom(3), pmNewContext(3), pmUseContext(3) and pmWhichCon‐
47 text(3).
48
50 PM_ERR_PROFILESPEC
51 indom was PM_INDOM_NULL and instlist was not empty
52
54 It is possible to add non-existent instance domains and non-existent
55 instances to an instance profile. None of the routines that use the
56 instance profile will ever issue an error if you do this. The cost of
57 checking, when checking is possible, outweighs any benefits.
58
59
60
61Performance Co-Pilot SGI PMADDPROFILE(3)