---
name: "pmiPutResult"
section: "3"
platform: "linux"
package: "pcp"
version: "7.2.2-2"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/pmiPutResult"
---

# pmiPutResult(3)

add a data record to a LOGIMPORT archive

## NAME

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

## C SYNOPSIS

**#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

**from pcp import pmi**

**log.put\_result(***result***)**\
 **log.put\_highres\_result(***result***)**

## DESCRIPTION

As part of the Performance Co-Pilot Log Import API (see [**LOGIMPORT**(3)](/LOGIMPORT/3.md)), 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)](/pmiPutValue/3.md) and/or [**pmiPutValueHandle**(3)](/pmiPutValueHandle/3.md) calls followed by **pmiHighResWrite**(3) for each record written to the archive.

**pmiPutHighResResult** is the preferred interface. It accepts a **pmResult** with a **struct timespec** timestamp, giving nanosecond resolution 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 defined by prior calls to [**pmiAddMetric**(3)](/pmiAddMetric/3.md) and [**pmiAddInstance**(3)](/pmiAddInstance/3.md). 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 services.

## DIAGNOSTICS

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

## SEE ALSO

[**LOGIMPORT**(3)](/LOGIMPORT/3.md), [**PMAPI**(3)](/PMAPI/3.md), [**pmiAddInstance**(3)](/pmiAddInstance/3.md), [**pmiAddMetric**(3)](/pmiAddMetric/3.md), [**pmiErrStr**(3)](/pmiErrStr/3.md), [**pmiPutValue**(3)](/pmiPutValue/3.md), [**pmiPutText**(3)](/pmiPutText/3.md), [**pmiPutLabel**(3)](/pmiPutLabel/3.md), [**pmiPutValueHandle**(3)](/pmiPutValueHandle/3.md), [**pmiSetTimezone**(3)](/pmiSetTimezone/3.md), **pmiHighResWrite**(3) and [**pmiWrite**(3)](/pmiWrite/3.md).
