PMIPUTTEXT(3)
π PMIPUTTEXT(3) π
okay so bestie, welcome to pmiPutText β it's a lil function from the Library Functions Manual (the PCP fam) and it's literally here to add help text for a metric or an instance domain. slay. β¨
πΈ NAME πΈ
pmiPutText β add help text for an metric or instance domain π«Ά
(yes the original says "an metric", we don't fix, we respect. periodt.)
β¨ C SYNOPSIS β¨
#include <pcp/pmapi.h>
#include <pcp/import.h>
int pmiPutText(unsigned int type, unsigned int class, unsigned int id,
const char *content);
cc ... -lpcp_import -lpcp
π Perl SYNOPSIS π
use PCP::LogImport;
pmiPutText($type, $class, $id, $content);
π¦ Python SYNOPSIS π¦
from pcp import pmi
log.pmiPutText(type, cls, id, content)
π DESCRIPTION π
So like, as part of the Performance Co-Pilot Log Import API (peep LOGIMPORT(3) for the full lore), pmiPutText adds help text for a given metric or instance domain. that's the whole vibe. π
The type must be one of PM_TEXT_PMID or PM_TEXT_INDOM. pick one, bestie, no in-between.
The class must be one of PM_TEXT_ONELINE or PM_TEXT_HELP. also a strict either/or situation, iconic.
If type is PM_TEXT_PMID, then id should match a pmid defined earlier in a call to pmiAddMetric(3). If type is PM_TEXT_INDOM, then id should match an instance domain defined earlier in a call to pmiAddMetric(3). basically, define the thing first or the id won't match anything, and that's on you π
content is a string containing the content of the help text. the actual words. the tea. β
no cap: no data will be written untilpmiWrite(3)is called, so multiple calls topmiPutTextare typically used to accumulate help text for several metrics or instance domains before callingpmiWrite(3). you're stacking it up, then you let it out all at once. main character energy fr fr. π₯
π DIAGNOSTICS π
pmiPutText returns zero on success, else a negative value that can be turned into an error message by calling pmiErrStr(3). so if it's negative, go ask pmiErrStr(3) what happened, she'll tell you. π«Ά
π SEE ALSO π
LOGIMPORT(3)pmiAddInstance(3)pmiAddMetric(3)pmiErrStr(3)pmiPutResult(3)pmiPutValue(3)pmiPutValueHandle(3)pmiPutLabel(3)pmiWrite(3)
Performance Co-Pilot made this one, and it's tagged PMIPUTTEXT(3) β mwah, go add some help text bestie, you got this ππ§ββοΈβ
π¦ 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: libpcp4-dev 7.2.1-2build1
- Copyright (c) 2018 Red Hat
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms