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

DIAGNOSTICS

36       PM_ERR_NOCONTEXT
37
38              handle does not identify a valid PMAPI context
39

SEE ALSO

41       PMAPI(3),   pmDupContext(3),   pmNewContext(3),   pmUseContext(3)   and
42       pmWhichContext(3).
43
44
45
46Performance Co-Pilot                  PCP                  PMDESTROYCONTEXT(3)
Impressum