PMADDPROFILE(3)
π PMADDPROFILE(3) π
Library Functions Manual Β· PCP girlie edition β¨
πΈ NAME πΈ
pmAddProfile β bestie, this is the one that adds instance(s) to the current PMAPI instance profile π«Ά
β¨ C SYNOPSIS β¨
#include <pcp/pmapi.h>
int pmAddProfile(pmInDom indom, int numinst, int *instlist);
cc ... -lpcp
π¦ DESCRIPTION π¦
okay so. the set of instances for performance metrics that come back from a pmFetch(3) call? you can filter or restrict that whole thing using an instance profile. it's giving VIP list π
there's literally one instance profile for each context your app creates at the Performance Metrics Application Programming Interface (PMAPI(3)), and each instance profile can include instances from one or more instance domains (go look at pmLookupDesc(3), iykyk).
pmAddProfile is the move when you wanna add new instance specifications to the instance profile of the current PMAPI context. no cap.
in the simplest variant, the list of instances identified by the instlist argument for the indom instance domain get added to the instance profile. that list of instance identifiers holds numinst values. periodt.
the indom value would normally be extracted from a call to pmLookupDesc(3) for a particular performance metric, and the instances in instlist would typically be determined by calls to pmGetInDom(3) or pmLookupInDom(3). iconic pipeline honestly π
to select all instances in all instance domains, use:
pmAddProfile(PM_INDOM_NULL, 0, (int *)0)
this is the only case whereindommay be equal toPM_INDOM_NULL. π
and if numinst is zero, or instlist is NULL, then all instances in indom are selected. easy β¨
π CAVEAT π
ngl, you can add non-existent instance domains and non-existent instances to an instance profile. and none of the routines that use the instance profile will ever issue an error if you do this. the cost of checking, when checking is possible, outweighs any benefits. so likeβ¦ the vibes are trusting, but the vibes are also not checking. π
π DIAGNOSTICS π
PM_ERR_PROFILESPECβindomwasPM_INDOM_NULLandinstlistwas not empty. caught you π
π SEE ALSO π
PMAPI(3), pmDelProfile(3), pmFetch(3), pmGetInDom(3), pmLookupDesc(3), pmLookupInDom(3), pmNewContext(3), pmUseContext(3) and pmWhichContext(3).
Performance Co-Pilot π PCP π PMADDPROFILE(3)
that's the whole page bestie, go add some instances to that profile and slay πβ¨π¦
π¦ 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