1PMIPUTRESULT(3) Library Functions Manual PMIPUTRESULT(3)
2
3
4
6 pmiPutResult - add a data record to a LOGIMPORT archive
7
9 #include <pcp/pmapi.h>
10 #include <pcp/impl.h>
11 #include <pcp/import.h>
12
13 int pmiPutResult(const pmResult *result);
14
15 cc ... -lpcp_import -lpcp
16
18 As part of the Performance Co-Pilot Log Import API (see LOGIMPORT(3)),
19 pmiPutResult provides an interface for developers familiar with the
20 internal PCP data structures to create output archives directly.
21
22 By building the pmResult data structure directly, then calling pmiPu‐
23 tResult the developer avoids calls to pmiPutValue(3) and/or pmiPutVal‐
24 ueHandle(3) followed by a call to pmiWrite(3) for each record written
25 to the archive.
26
27 Any metrics and instances appearing in the result must have been
28 defined by prior calls to pmiAddMetric(3) and pmiAddInstance(3).
29
30 pmiPutResult will arrange for any new metadata (metrics and/or instance
31 domain changes) covered by result to be also written to the PCP ar‐
32 chive.
33
34 Because of the complexity of the pmResult data structure, this routine
35 is not available in the Perl interface to the LOGIMPORT services.
36
38 pmiPutResult returns zero on success else a negative value that can be
39 turned into an error message by calling pmiErrStr(3).
40
42 LOGIMPORT(3), PMAPI(3), pmiAddInstance(3), pmiAddMetric(3),
43 pmiErrStr(3), pmiPutValue(3), pmiPutValueHandle(3), pmiSetTimezone(3)
44 and pmiWrite(3).
45
46
47
48Performance Co-Pilot PMIPUTRESULT(3)