pmWhichContext(3)

pmWhichContext3

Identify the current pmapi context

C synopsis

#include <pcp/pmapi.h>

int pmWhichContext(void);

cc ... -lpcp

Overview

An application using the Performance Metrics Application Programming Interface (PMAPI) may manipulate several concurrent contexts, each associated with a source of performance metrics, e.g. pmcd(1) on some host, or an archive of performance metrics as created by pmlogger(1).

pmWhichContext returns a handle for the current PMAPI context, that may be used in the associated PMAPI routines that require a handle to identify a PMAPI context.

Diagnostics

PM_ERR_NOCONTEXT

no current context

Releases

8 releases since Debian 5.0 (Lenny); the text changed 6 times.

  1. 5.0
  2. 6.0
  3. 8–10
  4. 11
  5. 12
  6. 13
  7. Arch

From pcp 7.2.2-2 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.