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  as‐
18       sociated  with  a  source  of performance metrics, e.g. pmcd(1) on some
19       host, or an archive of performance metrics as created by pmlogger(1).
20
21       Calling pmUseContext causes the current PMAPI context to be set to  the
22       context identified by handle.  The value of handle must be one returned
23       from an earlier call to pmNewContext(3) or pmDupContext(3).
24
25       Below the PMAPI, all contexts used by an application are saved in their
26       most  recently  modified state, so pmUseContext restores the context to
27       the state it was in the last time the context was used, not  the  state
28       of the context when it was established.
29

DIAGNOSTICS

31       PM_ERR_NOCONTEXT
32
33              handle does not identify a valid PMAPI context
34

SEE ALSO

36       PMAPI(3),  pmDestroyContext(3),  pmDupContext(3),  pmNewContext(3)  and
37       pmWhichContext(3).
38
39
40
41Performance Co-Pilot                  PCP                      PMUSECONTEXT(3)
Impressum