PMIPUTRESULT(3) Library Functions Manual PMIPUTRESULT(3)
pmiPutResult - add a data record to a LOGIMPORT archive
#include <pcp/pmapi.h> #include <pcp/import.h> int pmiPutResult(const pmResult *result); cc ... -lpcp_import -lpcp
As part of the Performance Co-Pilot Log Import API (see LOGIMPORT(3)), pmiPutResult provides an interface for developers familiar with the internal PCP data structures to create output archives directly. By building the pmResult data structure directly, then calling pmiPutResult the developer avoids calls to pmiPutValue(3) and/or pmiPutValueHandle(3) followed by a call to pmiWrite(3) for each record written to the archive. Any metrics and instances appearing in the result must have been defined by prior calls to pmiAddMetric(3) and pmiAddInstance(3). pmiPutResult will arrange for any new metadata (metrics and/or instance domain changes) covered by result to be also written to the PCP archive. Because of the complexity of the pmResult data structure, this routine is not available in the Perl interface to the LOGIMPORT services.
pmiPutResult returns zero on success else a negative value that can be turned into an error message by calling pmiErrStr(3).
LOGIMPORT(3), PMAPI(3), pmiAddInstance(3), pmiAddMetric(3), pmiErrStr(3), pmiPutValue(3), pmiPutText(3), pmiPutLabel(3), pmiPutValueHandle(3), pmiSetTimezone(3) and pmiWrite(3).
This page is part of the PCP (Performance Co-Pilot) project. Information about the project can be found at ⟨http://www.pcp.io/⟩. If you have a bug report for this manual page, send it to email@example.com. This page was obtained from the project's upstream Git repository ⟨https://github.com/performancecopilot/pcp.git⟩ on 2023-06-23. (At that time, the date of the most recent commit that was found in the repository was 2023-06-21.) If you discover any rendering problems in this HTML version of the page, or you believe there is a better or more up-to-date source for the page, or you have corrections or improvements to the information in this COLOPHON (which is not part of the original manual page), send a mail to firstname.lastname@example.org Performance Co-Pilot PMIPUTRESULT(3)
Pages that refer to this page: logimport(3), pmiaddmetric(3), pmiputlabel(3), pmiputmark(3), pmiputtext(3), pmiputvalue(3), pmiputvaluehandle(3), pmistart(3)