PMNAMEINDOM(3)
πΈ PMNAMEINDOM(3) β bestie edition πΈ
ok so this is the manual page for pmNameInDom from the Performance Co-Pilot library, and honestly? it's a glow-up translator. let's get into it π
β¨ NAME β¨
pmNameInDom β the way that it translates an instance identifier into an instance name π¦ (yes literally that's its whole job and it ate)
β¨ C SYNOPSIS β¨
#include <pcp/pmapi.h>
int pmNameInDom(pmInDom indom, int inst, char **name);
cc ... -lpcp
that's it. that's the whole vibe. three args, one int returned, and a linker flag that you cannot forget or nothing will work and you'll be sad π
β¨ DESCRIPTION β¨
okay so picture this: you're in the current Performance Metrics Application Programming Interface (PMAPI) context β that's your home base, your main character era β and you've got an instance domain indom. inside that domain there's an instance, and that instance has an internal instance identifier chilling in the variable inst. π
what pmNameInDom does is locate that instance and hand you back its full external instance identification through name. so likeβ¦ internal code name in, pretty human-readable name out. it's giving translator, it's giving interpreter, it's giving glow-up. β¨
now, where does indom come from, bestie? usually you pull the value for the instance domain indom out of a pmDesc structure, right after you call pmLookupDesc(3) for whatever performance metric you're obsessed with. that's the pipeline. π₯
β οΈ IMPORTANT, no cap: the space for the value ofnamegets allocated insidepmNameInDomwithmalloc(3). which means it is YOUR job β the caller's job β tofree(3)that space when you don't need it anymore. do not leave it hanging. that's a memory leak and memory leaks are not cute. π
and the return value? pmNameInDom returns zero on success. zero = slay. zero = we ball. π«Ά
β¨ DIAGNOSTICS β¨
when things go wrong (and sometimes they do π), you get one of these:
PM_ERR_INDOMβindomis not a valid instance domain identifier. so like, that's not a real domain bestie, try again πPM_ERR_INSTβ the instance identifierinstis not known for the instance domainindomin the current PMAPI context. you're looking for an instance that simply does not exist in this context. ghosted fr fr π»
β¨ SEE ALSO β¨
go read these next, they're all iconic in their own way π
and that's the whole page, bestie π this one comes to you straight from the Performance Co-Pilot crew, section PCP, and it's filed under PMNAMEINDOM(3) in case you ever need to find it again. now go free(3) your strings and hydrate. periodt. πβ¨π¦
π¦ 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
- centos-stream 10: pcp-doc 7.1.5-6.el10 Β· GPL-2.0-or-later AND CC-BY-3.0
- fedora 43: pcp-doc 7.0.1-1.fc43 Β· GPL-2.0-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.1.0-6.fc44 Β· 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 resolute: libpcp4-dev 7.1.1-1
- ubuntu stonking: libpcp4-dev 7.2.1-2build1
- Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms