PMUNREGISTERDERIVED(3)
π¦ PMUNREGISTERDERIVED(3) π¦
okay bestie, we're in the Library Functions Manual section, and today's main character is pmUnregisterDerived π
β¨ NAME β¨
pmUnregisterDerived β unregister a derived metric π
πΈ C SYNOPSIS πΈ
#include <pcp/pmapi.h>
int pmUnregisterDerived(char *name);
cc ... -lpcp
π DESCRIPTION π
so first, a lil lore drop πβ¨ Derived metrics are literally the glow-up of the Performance Metrics Name Space (PMNS) β they let you add brand new metrics defined on the PCP client-side, using expressions built on top of the performance metrics you already have. it's giving "new metric, who dis" π₯
now, there's two flavours, and you gotta know which is which:
- Global derived metrics get created by calling
pmRegisterDerived(3),pmRegisterDerivedMetric(3)orpmLoadDerivedConfig(3). - Per-context derived metrics get created by calling
pmAddDerived(3)orpmAddDerivedMetric(3).
and what does pmUnregisterDerived do? it removes the definition of the derived metric name from the set of global derived metrics and from every active PMAPI context. so it's not a subtle lil removal, bestie β it's a full βοΈ bye-bye across the board. she ate and left no crumbs π
π₯ DIAGNOSTICS π₯
On success, pmUnregisterDerived returns a value greater than or equal to zero, being the number of contexts from which name was removed. so if it says 3, that's three contexts that just got the memo π¬β¨
Otherwise, pmUnregisterDerived returns a PMAPI error, and the application should call pmErrStr(3) to retrieve the corresponding error message. like, go get your error translation bestie, pmErrStr(3) has you π«Ά
ngl, a negative return here is not a vibe check you want to fail β handle it, don't ignore it π
π SEE ALSO π
PCPIntro(1)PMAPI(3)pmAddDerived(3)pmAddDerivedMetric(3)pmErrStr(3)pmLoadDerivedConfig(3)pmRegisterDerived(3)pmRegisterDerivedMetric(3)PMNS(5)
and that's the whole page, periodt π this one came straight out of Performance Co-Pilot (the source/version vibe is all theirs, no date stamped on the footer, just the PCP name, iykyk) β go forth and unregister responsibly, my love ππ¦β
π¦ 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.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) 2025 Ken McDonell. All Rights Reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms