1PMIADDINSTANCE(3) Library Functions Manual PMIADDINSTANCE(3)
2
3
4
6 pmiAddInstance - add an element to an instance domain in a LOGIMPORT
7 context
8
10 #include <pcp/pmapi.h>
11 #include <pcp/impl.h>
12 #include <pcp/import.h>
13
14 int pmiAddInstance(pmInDom indom, const char *instance, int inst);
15
16 cc ... -lpcp_import -lpcp
17
19 use PCP::LogImport;
20
21 pmiAddInstance($indom, $instance, $inst);
22
24 As part of the Performance Co-Pilot Log Import API (see LOGIMPORT(3)),
25 pmiAddInstance adds a new element to the instance domain identified by
26 indom.
27
28 indom would normally be constructed using the pmInDom_build macro, e.g.
29 pmInDom_build(PMI_DOMAIN,0) for the first instance domain in the Per‐
30 formance Metrics Domain PMI_DOMAIN (which is the default for all meta
31 data created by the LOGIMPORT library).
32
33 The new instance must have both an external name (instance) and an
34 internal instance identifier (inst) that is unique across all instances
35 in the indom instance domain. There is a special ``uniqueness rule''
36 for instance that is imposed by pmLookupInDom(3), namely that the
37 external instance name must be unique in the leading non-space charac‐
38 ters, e.g. the instance names ``foo'' and ``foo bar'' are considered
39 the same by this rule and not allowed in the same instance domain, but
40 ``foo'' and ``foobar'' would be allowed.
41
42 Once defined, the external instance name can be used in calls to
43 pmiGetHandle(3) and/or pmiPutValue(3) with the name of a metric defined
44 over the same instance domain.
45
47 pmiAddInstance returns zero on success else a negative value that can
48 be turned into an error message by calling pmiErrStr(3).
49
51 LOGIMPORT(3), pmiAddMetric(3), pmiErrStr(3), pmiGetHandle(3), pmiPut‐
52 Value(3) and pmLookupInDom(3).
53
54
55
56Performance Co-Pilot PMIADDINSTANCE(3)