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 until pmiWrite(3) is called, so multiple calls to pmiPutText are typically used to accumulate help text for several metrics or instance domains before calling pmiWrite(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 🌈


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