pmiputresult(3) — Linux manual page

NAME | C SYNOPSIS | Python SYNOPSIS | DESCRIPTION | DIAGNOSTICS | SEE ALSO | COLOPHON

PMIPUTRESULT(3)          Library Functions Manual         PMIPUTRESULT(3)

NAME         top

       pmiPutResult, pmiPutHighResResult - add a data record to a
       LOGIMPORT archive

C SYNOPSIS         top

       #include <pcp/pmapi.h>
       #include <pcp/import.h>

       int pmiPutResult(const pmResult_v2 *result);
       int pmiPutHighResResult(const pmResult *result);

       cc ... -lpcp_import -lpcp

Python SYNOPSIS         top

       from pcp import pmi

       log.put_result(result)
       log.put_highres_result(result)

DESCRIPTION         top

       As   part   of  the  Performance  Co-Pilot  Log  Import  API  (see
       LOGIMPORT(3)), these routines provide an interface for  developers
       familiar  with  the  internal PCP data structures to create output
       archives directly.

       By building a pmResult data structure directly and calling one  of
       these  routines,  the developer avoids the separate pmiPutValue(3)
       and/or pmiPutValueHandle(3) calls followed  by  pmiHighResWrite(3)
       for each record written to the archive.

       pmiPutHighResResult  is the preferred interface.  It accepts a pm‐
       Result with a struct timespec timestamp, giving nanosecond resolu‐
       tion and Y2038-safe 64-bit seconds.

       pmiPutResult accepts the older  pmResult_v2  type  with  a  struct
       timeval timestamp (microsecond resolution).

       Any  metrics  and instances appearing in result must have been de‐
       fined by prior calls  to  pmiAddMetric(3)  and  pmiAddInstance(3).
       Both  routines  will  arrange for any new metadata (metrics and/or
       instance domain changes) covered by result to be  written  to  the
       PCP archive.

       Because  of the complexity of the pmResult data structure, neither
       routine is available in the Perl interface to the  LOGIMPORT  ser‐
       vices.

DIAGNOSTICS         top

       Both  routines  return  zero on success else a negative value that
       can be turned into an error message by calling pmiErrStr(3).

SEE ALSO         top

       LOGIMPORT(3),   PMAPI(3),   pmiAddInstance(3),    pmiAddMetric(3),
       pmiErrStr(3),   pmiPutValue(3),   pmiPutText(3),   pmiPutLabel(3),
       pmiPutValueHandle(3),  pmiSetTimezone(3),  pmiHighResWrite(3)  and
       pmiWrite(3).

COLOPHON         top

       This  page is part of the PCP (Performance Co-Pilot) project.  In‐
       formation about the project can be found at  ⟨http://www.pcp.io/⟩.
       If  you  have  a  bug  report  for  this  manual  page, send it to
       pcp@groups.io.  This page was obtained from the project's upstream
       Git repository ⟨https://github.com/performancecopilot/pcp.git⟩  on
       2026-08-04.   (At  that  time,  the date of the most recent commit
       that was found in the repository was 2026-08-04.)  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 man-pages@man7.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)