PMWHICHCONTEXT(3)

πŸ“¦
version 7.2.2 Β· 3 versions
, in arch rolling, centos-stream 10, fedora 43, fedora 44, ubuntu resolute, ubuntu stonking

PMWHICHCONTEXT(3) πŸ’–

okay bestie, gather round, we're doing a library functions manual moment and honestly? it's giving "tiny function, huge main character energy" ✨


🌸 NAME 🌸

pmWhichContext β€” identify the current PMAPI context 🫢


✨ C SYNOPSIS ✨

like, here's the whole vibe, character for character:

#include <pcp/pmapi.h>

int pmWhichContext(void);

cc ... -lpcp

πŸ’… DESCRIPTION πŸ’…

okay so picture this: an application using the Performance Metrics Application Programming Interface (PMAPI) can manipulate several concurrent contexts at once. and each one of those contexts is associated with a source of performance metrics β€” like pmcd(1) on some host, or an archive of performance metrics as created by pmlogger(1). yes, multiple. at the same time. she contains multitudes πŸ’–

so what does pmWhichContext do? it returns a handle for the current PMAPI context πŸ‘‘ and that handle is literally what you feed into the associated PMAPI routines that need a handle to identify a PMAPI context. that's it. that's the whole job. and she does it flawlessly, no cap.


🩺 DIAGNOSTICS 🩺

  • PM_ERR_NOCONTEXT β€” no current context 😭 (yeah, there's nothing there, bestie, there is no context to speak of)

πŸ‘€ SEE ALSO πŸ‘€

PMAPI(3), pmDestroyContext(3), pmDupContext(3), pmNewContext(3) and pmUseContext(3).


and that's the whole page, my love πŸŽ€ go forth and identify your contexts, you absolute icon πŸ’œ

this has been a Performance Co-Pilot production, from the PCP girlies, filed under PMWHICHCONTEXT(3) β€” periodt πŸ’…

πŸ“¦ where this page comes from