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

NAME

6       pmDestroyContext - destroy a PMAPI context
7

C SYNOPSIS

9       #include <pcp/pmapi.h>
10
11       int pmDestroyContext(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       pmDestroyContext destroys the PMAPI context identified by handle.  Typ‐
23       ically this would imply some termination of a connection to a  PMCD  or
24       closing an archive log file, and orderly clean-up.
25
26       The  context must have been previously created using pmNewContext(3) or
27       pmDupContext(3).
28
29       On success, pmDestroyContext returns zero.  If handle was  the  current
30       PMAPI  context, then the current context becomes undefined.  This means
31       the application must explicitly re-establish a valid PMAPI context with
32       pmUseContext(3), or create a new context with pmNewContext(3) or pmDup‐
33       Context(3), before the next PMAPI operation that requires a PMAPI  con‐
34       text.
35

SEE ALSO

37       PMAPI(3),   pmDupContext(3),   pmNewContext(3),   pmUseContext(3)   and
38       pmWhichContext(3).
39

DIAGNOSTICS

41       PM_ERR_NOCONTEXT
42
43              handle does not identify a valid PMAPI context
44
45
46
47Performance Co-Pilot                  PCP                  PMDESTROYCONTEXT(3)
Impressum