PMDELPROFILE(3)
π PMDELPROFILE(3) β Library Functions Manual π
okay bestie, welcome to the Library Functions Manual for pmDelProfile, and no we are not gatekeeping this one. it's giving "spring cleaning for your instance profile" and honestly? iconic. π§Ήβ¨
β¨ NAME β¨
pmDelProfile β delete instance(s) from the current PMAPI instance profile π
πΈ C SYNOPSIS πΈ
#include <pcp/pmapi.h>
int pmDelProfile(pmInDom indom, int numinst, int *instlist);
cc ... -lpcp
π¦ DESCRIPTION π¦
so here's the tea: when you call pmFetch(3), the set of instances you get back for your performance metrics can be filtered or restricted using something called an instance profile. yes bestie, a profile. main character behaviour. π
every single context that your app creates at the Performance Metrics Application Programming Interface (PMAPI) gets its own instance profile β one per context, no sharing, no borrowing, we respect boundaries here π«Ά β and each one of those profiles can hold instances from one or more instance domains (peep pmLookupDesc(3) if you wanna know more about those).
pmDelProfile is the function you call when you wanna delete instance specifications from the instance profile of the current PMAPI context. bye bye, deleted, blocked, unfollowed π«
in the simplest variant, the list of instances that the instlist argument points at β for the indom instance domain β gets removed from the instance profile. and that list of instance identifiers contains numinst values. simple as. β¨
where does indom come from, you ask? normally you'd pull it out of a call to pmLookupDesc(3) for a particular performance metric, and the instances sitting in instlist would typically be figured out by calling pmGetInDom(3) or pmLookupInDom(3). teamwork makes the dream work fr fr. π
now for the special cases, and listen up because this part matters:
- if
indomequalsPM_INDOM_NULLandnuminstis zero, then all instance domains are selected for deletion. every single one. gone. π - if
instlistisNULL, then all instances in the selected domain(s) get removed from the profile.
and if you wanna disable literally every available instance in every domain? hit it with:
pmDelProfile(PM_INDOM_NULL, 0, NULL)
that's the only situation where indom is allowed to be PM_INDOM_NULL. the only one. don't be out here passing PM_INDOM_NULL in other combos, bestie, it's not that kind of function. π
β οΈ CAVEAT β οΈ
okay so this is lowkey wild but it's real and we need to talk about it: you can delete non-existent instance domains and non-existent instances from an instance profile. and none of the routines that use the instance profile will ever throw an error if you do this. not one. π
the reasoning, per the original tea, is that the cost of checking β when checking is even possible β outweighs any benefits. so yeah. the vibes are "we trust you, bestie" and honestly that's a lot of trust. proceed accordingly. π«Ά
so like... don't expect a little error message to catch you. it won't. the silence is the feature.
π©Ί DIAGNOSTICS π©Ί
PM_ERR_PROFILESPECβ this one shows up whenindomwasPM_INDOM_NULLandinstlistwas not empty. that's the mismatch, that's the crime, that's the error. π¨
π SEE ALSO π
pmAddProfile(3)PMAPI(3)pmFetch(3)pmGetInDom(3)pmLookupDesc(3)pmLookupInDom(3)pmNewContext(3)pmUseContext(3)pmWhichContext(3)
and that's the whole page, no notes. this manual page came to you straight from Performance Co-Pilot β that's the PCP girlies, you know the ones β and it's filed under PMDELPROFILE(3). go forth and delete responsibly, bestie. 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