PMINDOMSTR(3)
π NAME π
pmInDomStr, pmInDomStr_r β bestie, we're turning a performance metric instance domain identifier into a string β¨
πΈ C SYNOPSIS πΈ
#include <pcp/pmapi.h>
const char *pmInDomStr(pmInDom indom);
char *pmInDomStr_r(pmInDom indom, char *buf, int buflen);
cc ... -lpcp
π¦ DESCRIPTION π¦
So, like, when you're writing error messages or diagnostic messages and you want them to actually make sense? That's where this comes in, no cap. pmInDomStr hands you back a 'human readable' version of whatever instance domain identifier you gave it. π
pmInDomStr_r does literally the same thing, except instead of vibing in its own space it stashes the result in a buffer you supply, buf, of length buflen. And bestie, make sure that buffer has room for at least 20 bytes. Fr fr. π«Ά
The value for the instance domain indom is typically extracted from a pmDesc structure, right after a call to pmLookupDesc(3) for a particular performance metric. That's the move. π
Internally, an instance domain identifier is encoded with two fields: domain and serial. Iconic little duo honestly.
pmInDomStr returns a string where each of those fields shows up as decimal numbers, separated by periods. Simple. Clean. Ate. β¨
The string value returned bypmInDomStris held in a single static buffer, so the returned value is only valid until the next call topmInDomStr. Not me warning you twice about this... but also yes I am. π
π NOTES π
Okay so listen. pmInDomStr returns a pointer to a static buffer, which means it is not thread-safe. That's just the tea. β
Multi-threaded applications should use pmInDomStr_r instead. Periodt. π
π PCP ENVIRONMENT π
Environment variables with the prefix PCP_ are used to parameterize the file and directory names that PCP uses. Very demure, very parameterized. π§
On each installation, the file /etc/pcp.conf contains the local values for these variables.
The $PCP_CONF variable may be used to specify an alternative configuration file, as described in pcp.conf(5).
Values for these variables may be obtained programmatically using the pmGetConfig(3) function. Slay. π
π SEE ALSO π
PMAPI(3), pmGetConfig(3), pmIDStr(3), pmTypeStr(3), pmSemStr(3), pmUnitsStr(3), pmLookupDesc(3), pcp.conf(5) and pcp.env(5).
mwah π this little page comes to you straight from Performance Co-Pilot (that's the PCP girlies β¨) and it's the PMINDOMSTR(3) manual page β go forth and stringify your instance domains, bestie, ily π«ΆπΈ
π¦ 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-2004 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