PMDASTORE(3)
π PMDASTORE(3) π
okay bestie, welcome to pmdaStore β page 3 of the Library Functions Manual, PCP edition. she's a lil function, she's got one job, and honestly? she's mostly just standing there looking cute. let's get into it π«Ά
β¨ NAME β¨
pmdaStore β store a value into a metric for a PMDA
like, put a number into a metric. that's the whole vibe. π
πΈ C SYNOPSIS πΈ
#include <pcp/pmapi.h>
#include <pcp/pmda.h>
int pmdaStore(pmResult *result, pmdaExt *pmda);
cc ... -lpcp_pmda -lpcp
two includes, one function, one link line. no cap, that's it. π
π¦ DESCRIPTION π¦
so, part of the Performance Metrics Domain Agent (PMDA) API (go read PMDA(3) if you haven't, it's the whole lore) β pmdaStore is the generic callback for storing a value into a metric. it's the thing that gets called when someone wants to write to a metric, not just read it. main character behavior, lowkey.
but here's the tea: pmdaStore is usually a no-op, because by default no metrics can be altered. like, she's there, she's present, she's not doing anything. iconic of her tbh. π
and even if you do write a store callback that lets metrics be altered by pmstore(1)? that implementation is very application dependent. there's no universal recipe, bestie. it's giving "you're on your own, but with love." π
π CAVEAT π
β οΈ the PMDA must be usingPMDA_INTERFACE_2or later, as specified in the call topmdaDSO(3)orpmdaDaemon(3). don't skip this. fr fr. if you're on an older interface, this whole thing is not gonna work and that's on periodt. π
π DIAGNOSTICS π
pmdaStore returns PM_ERR_PERMISSION to indicate that no metrics may be modified.
so if you see that error, it's not a bug, it's the function politely telling you "bestie no, we don't do that here." π«π
π SEE ALSO π
go read them, they're all connected, iykyk π§β¨
and that's the page!! brought to you by Performance Co-Pilot, aka PCP β the source and version you can thank for all of this. mwah, slay, go store a value (or don't, she's a no-op, remember?) ππ
π¦ 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: libpcp-pmda3-dev 7.1.1-1
- ubuntu stonking: libpcp-pmda3-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