PMDUPCONTEXT(3)
β¨ NAME β¨
pmDupContext β duplicate a PMAPI context π (yes bestie, it's exactly what it sounds like)
πΈ C SYNOPSIS πΈ
#include <pcp/pmapi.h>
int pmDupContext(void);
cc ... -lpcp
π DESCRIPTION π
okay so picture this: your app is out here using the Performance Metrics Application Programming Interface (PMAPI, iykyk) and it's juggling several concurrent contexts at the same time π. Each one of those contexts is tied to its own lil source of performance metrics β like pmcd(1) running on some host, or a whole set of archives of performance metrics as created by pmlogger(1) ποΈ.
So when you call pmDupContext, it replicates the current PMAPI context and hands you back a handle for the brand-new context π₯. That handle is literally made to be passed into subsequent calls of pmUseContext(3), slay.
And here's the part that's giving main character energy: once it's created, the duplicated context and the original context exist independently π¦. So their instance profiles and their collection time β which, quick note, is only relevant for archive contexts β can each be varied on their own, no strings attached π.
Also, plot twist: the newly replicated context becomes the current context. Periodt π .
π SEE ALSO π
k that's the whole vibe, bestie π«Ά this was Performance Co-Pilot, PCP β mwah, no notes, go duplicate responsibly πβ¨
π¦ 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) 2016 Red Hat
- 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