1LOGIMPORT(3)               Library Functions Manual               LOGIMPORT(3)
2
3
4

NAME

6       LOGIMPORT - introduction to the library for importing data and creating
7       a PCP archive
8

C SYNOPSIS

10       #include <pcp/pmapi.h>
11       #include <pcp/impl.h>
12       #include <pcp/import.h>
13
14       cc ... -lpcp_import -lpcp
15

Perl SYNOPSIS

17       use PCP::LogImport;
18

DESCRIPTION

20       The Performance Co-Pilot Log Import (LOGIMPORT) API is a  library  (and
21       Perl  wrapper) that supports the creation of PCP archives from external
22       sources of performance data, either in the form of historical logs  and
23       spreadsheets  or  from  real-time  sources that are not integrated as a
24       Performance Metrics Domain Agent (PMDA) under the control of pmcd(1).
25
26       The typical usage for LOGIMPORT would involve:
27
28       ·  An initial call to pmiStart(3).
29
30       ·  Optional calls to pmiSetHostname(3) and/or pmiSetTimezone(3) to  set
31          the hostname and timezone for the source of the performance data.
32
33       ·  One or more calls to pmiAddMetric(3) to define performance metrics.
34
35       ·  One  or  more calls to pmiAddInstance(3) to define instances associ‐
36          ated with the metrics.
37
38       ·  Optional calls to pmiGetHandle(3) to defined convenience handles for
39          metric-instance pairs.
40
41       ·  A  main loop in which performance data is injested and for each sam‐
42          ple time interval, the PCP archive record is constructed by calls to
43          pmiPutValue(3)  and/or  pmiPutValueHandle(3),  followed by a call to
44          pmiWrite(3) to flush all data and any associated new metadata to the
45          PCP  archive.  Alternatively, pmiPutResult(3) could be used to pack‐
46          age and process all the data for one sample time interval.
47
48       ·  Once the input source of data has been consumed,  calling  pmiEnd(3)
49          to complete the PCP archive creation and close all open files.
50
51       If  new  metrics and/or instances are discovered during the data injes‐
52       tion, these can be added by subsequent calls to pmiAddMetric(3)  and/or
53       pmiAddInstance(3),  provided  all  the  metrics and instances have been
54       defined before a call to  pmiGetHandle(3),  pmiPutValue(3)or  pmiPutRe‐
55       sult(3) that references those metrics and instances.
56

SEE ALSO

58       pmcd(1),  pmlogger(1),  pmiGetHandle(3),  pmiAddInstance(3), pmiAddMet‐
59       ric(3),  pmiEnd(3),  pmiErrStr(3),   pmiPutResult(3),   pmiPutValue(3),
60       pmiPutValueHandle(3), pmiSetHostname(3), pmiSetTimezone(3), pmiStart(3)
61       and pmiWrite(3).
62
63
64
65Performance Co-Pilot                                              LOGIMPORT(3)
Impressum