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/import.h>
11
12       int pmiGetHandle(const char *name, const char *instance);
13
14       cc ... -lpcp_import -lpcp
15

Perl SYNOPSIS

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

DESCRIPTION

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

DIAGNOSTICS

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

SEE ALSO

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