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/import.h>
12
13       cc ... -lpcp_import -lpcp
14

Perl SYNOPSIS

16       use PCP::LogImport;
17

Python SYNOPSIS

19       from pcp import pmi
20

DESCRIPTION

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

SEE ALSO

62       pmcd(1),  pmlogger(1),  pmiGetHandle(3),  pmiAddInstance(3), pmiAddMet‐
63       ric(3),  pmiEnd(3),   pmiErrStr(3),   pmiPutMark(3),   pmiPutResult(3),
64       pmiPutValue(3),  pmiPutValueHandle(3),  pmiPutText(3),  pmiPutLabel(3),
65       pmiSetHostname(3), pmiSetTimezone(3), pmiStart(3) and pmiWrite(3).
66
67
68
69Performance Co-Pilot                                              LOGIMPORT(3)
Impressum