1PMIGETHANDLE3()                                                PMIGETHANDLE3()
2
3
4

NAME

6       pmiGetHandle - define a handle for a metric-instance pair
7

C SYNOPSIS

9       #include <pcp/pmapi.h>
10       #include <pcp/impl.h>
11       #include <pcp/import.h>
12
13       int pmiGetHandle(const char *name, const char *instance);
14
15       cc ... -lpcp_import -lpcp
16

Perl SYNOPSIS

18       use PCP::LogImport;
19
20       $handle = pmiGetHandle($name, $instance);
21

DESCRIPTION

23       As  part of the Performance Co-Pilot Log Import API (see LOGIMPORT(3)),
24       pmiGetHandle creates a handle for a given  metric  and  instance.   The
25       handle  is  returned as the value from the pmiGetHandle call and can be
26       used in subsequent calls to pmiPutValueHandle(3).
27
28       The metric's name should match one defined earlier in a call to pmiAdd‐
29       Metric(3).
30
31       For  singular  metrics  (those  defined  with  an  instance  domain  of
32       PM_INDOM_NULL), the instance should be NULL or an empty string,  other‐
33       wise instance should match the name of an instance defined earlier in a
34       call to pmiAddInstance(3) for the metric's instance domain.
35
36       When combined with pmiPutValueHandle(3), the use of handles  provide  a
37       performance  improvement  over the alternative lookup for a metric name
38       and an instance name for each data value that is required  for  pmiPut‐
39       Value(3).
40

DIAGNOSTICS

42       On  failure  pmiGetHandle  returns  a negative value that can be turned
43       into an error message by calling pmiErrStr(3).
44

SEE ALSO

46       LOGIMPORT(3),  pmiAddInstance(3),  pmiAddMetric(3),  pmiErrStr(3)   and
47       pmiPutValueHandle(3).
48
49
50
51                             Performance Co-Pilot              PMIGETHANDLE3()
Impressum