1PMUSECONTEXT(3)            Library Functions Manual            PMUSECONTEXT(3)
2
3
4

NAME

6       pmUseContext - change current PMAPI context
7

C SYNOPSIS

9       #include <pcp/pmapi.h>
10
11       int pmUseContext(int handle);
12
13       cc ... -lpcp
14

DESCRIPTION

16       An  application  using  the Performance Metrics Application Programming
17       Interface (PMAPI) may  manipulate  several  concurrent  contexts,  each
18       associated  with  a source of performance metrics, e.g. pmcd(1) on some
19       host, or an archive log of performance metrics  as  created  by  pmlog‐
20       ger(1).
21
22       Calling  pmUseContext causes the current PMAPI context to be set to the
23       context identified by handle.  The value of handle must be one returned
24       from an earlier call to pmNewContext(3) or pmDupContext(3).
25
26       Below the PMAPI, all contexts used by an application are saved in their
27       most recently modified state, so pmUseContext restores the  context  to
28       the  state  it was in the last time the context was used, not the state
29       of the context when it was established.
30

SEE ALSO

32       PMAPI(3),  pmDestroyContext(3),  pmDupContext(3),  pmNewContext(3)  and
33       pmWhichContext(3).
34

DIAGNOSTICS

36       PM_ERR_NOCONTEXT
37
38              handle does not identify a valid PMAPI context
39
40
41
42Performance Co-Pilot                  PCP                      PMUSECONTEXT(3)
Impressum