PMIPUTVALUEHANDLE(3)
π PMIPUTVALUEHANDLE β bestie, let's talk handles π
okay so. pmiPutAtomValueHandle, pmiPutValueHandle β add a value for a metric-instance pair via a handle. yes this is a PMIPUTVALUEHANDLE(3) situation, Library Functions Manual core, and we're gonna get through it together. π«Ά
β¨ C SYNOPSIS β¨
#include <pcp/pmapi.h>
#include <pcp/import.h>
int pmiPutAtomValueHandle(int handle, pmAtomValue *atom);
int pmiPutValueHandle(int handle, const char *value);
cc ... -lpcp_import -lpcp
like, you gotta link it or it simply will not slay. periodt. π
πΈ Perl SYNOPSIS πΈ
use PCP::LogImport;
pmiPutValueHandle($handle, $value);
π¦ Python SYNOPSIS π¦
from pcp import pmi
log.pmiPutValueHandle(handle, value)
π DESCRIPTION π
so this is part of the Performance Co-Pilot Log Import API (see LOGIMPORT(3)), and pmiPutAtomValueHandle + pmiPutValueHandle are the girlies that add a single value to the current output record for a given metric and instance, using the handle that you defined with an earlier call to pmiGetHandle(3). no handle, no entry. that's the rule. β¨
- With
pmiPutAtomValueHandle, the atom passes the binary value directly, using a union of types. it's giving raw. it's giving direct. π - With
pmiPutValueHandle, the value should be in a format consistent with the metric's type as defined back in your call topmiAddMetric(3). so if you defined it one way, do not show up with something else. vibe check your types, bestie. π
and the big one: no data will be written untilpmiWrite(3)is called. not one crumb. so multiple calls topmiPutAtomValueHandle,pmiPutValueHandle, orpmiPutValue(3)are typically used to accumulate data values for several metric-instance pairs before you finally callpmiWrite(3). it's a whole stack-up-and-go situation. π§
π DIAGNOSTICS π
pmiPutAtomValueHandle and pmiPutValueHandle return zero on success, else a negative value that can be turned into an error message by calling pmiErrStr(3). so if you get a negative, don't spiral β just call pmiErrStr(3) and it'll tell you what happened. π«Ά
π SEE ALSO π
LOGIMPORT(3)pmiErrStr(3)pmiGetHandle(3)pmiPutResult(3)pmiPutValue(3)pmiPutText(3)pmiPutLabel(3)pmiWrite(3)
and that's the roster. read them, love them, use them. π
Performance Co-Pilot made this one, and it's tagged PMIPUTVALUEHANDLE(3) β go off, you icon. βπ
π¦ where this page comes from
- arch rolling: pcp 7.2.2-2 Β· GPL-2.0-or-later AND LGPL-2.1-or-later AND CC-BY-3.0
- fedora 43: pcp-doc 7.2.1-1.fc43
- fedora 43: pcp-doc 7.2.2-1.fc43
- fedora 43: pcp-doc 7.2.2-2.fc43 Β· GPL-2.0-or-later AND CC-BY-3.0
- fedora 44: pcp-doc 7.2.1-1.fc44
- fedora 44: pcp-doc 7.2.2-1.fc44
- fedora 44: pcp-doc 7.2.2-2.fc44 Β· GPL-2.0-or-later AND CC-BY-3.0
- ubuntu stonking: pcp 7.2.1-2build1
- Copyright (c) 2010 Ken McDonell. All Rights Reserved
- Copyright (c) 2018,2026 Red Hat
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms