PMNAMEINDOMARCHIVE(3)
π pmNameInDomArchive(3) β the glow-up guide π
okay bestie, sit down, hydrate, and let me tell you about pmNameInDomArchive from the Library Functions Manual β¨ it's a lil PCP function that translates an instance identifier into an instance name, and honestly? it's giving librarian energy in the best way ππ
β¨ NAME β¨
pmNameInDomArchive β translate an instance identifier into an instance name π
πΈ C SYNOPSIS πΈ
#include <pcp/pmapi.h>
int pmNameInDomArchive(pmInDom indom, int inst, char **name);
cc ... -lpcp
π¦ DESCRIPTION π¦
so here's the tea π: as long as your current Performance Metrics Application Programming Interface (PMAPI) context is associated with a set of archives, pmNameInDomArchive will scan the union of all the instance domain metadata for the instance domain indom, hunt down the first instance whose internal instance identifier matches the one you passed in inst, and hand you back the full external instance identification through name. slay. π
this routine is basically the specialized, archive-flavored version of the more general PMAPI routine pmNameInDom β same vibe, narrower scope, still iconic π
the value for the instance domain indom is typically extracted from a pmDesc structure, right after you've called pmLookupDesc(3) for a particular performance metric. iykyk π
β οΈ okay important one, don't skip this: the space for the value ofnameis allocated insidepmNameInDomArchiveusingmalloc(3), and it is the responsibility of the caller tofree(3)that space once it's no longer required. no leaks, bestie, we're not doing that today ππ
pmNameInDomArchive returns zero on success. periodt. β
π DIAGNOSTICS π
PM_ERR_NOTARCHIVEβ the current PMAPI context is not associated with a set of archives πPM_ERR_INDOM_LOGβindomis not a defined instance domain identifier for the set of archives π«PM_ERR_INST_LOGβ the instance identifierinstis not known for the instance domainindomin the set of archives π
π SEE ALSO π
PMAPI(3), pmGetConfig(3), pmGetInDomArchive(3), pmLookupInDomArchive(3), pmNameInDom(3), pcp.conf(5) and pcp.env(5). go read them, they're all part of the same friend group π«Άπ
and that's the whole page, babe π this one came to you from Performance Co-Pilot (PCP) as PMNAMEINDOMARCHIVE(3) β stan a well-maintained manpage, no cap β¨π
π¦ 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) 2016 Red Hat
- 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