1PMNEWCONTEXTZONE(3) Library Functions Manual PMNEWCONTEXTZONE(3)
2
3
4
6 pmNewContextZone - establish a reporting timezone based on a PMAPI con‐
7 text
8
10 #include <pcp/pmapi.h>
11
12 int pmNewContextZone(void)
13
14 cc ... -lpcp
15
17 The current reporting timezone affects the timezone used by pmCtime(3)
18 and pmLocaltime(3).
19
20 If the current PMAPI context is an archive, pmNewContextZone uses the
21 timezone from the archive label record to set the current reporting
22 timezone.
23
24 If the current PMAPI context corresponds to a host source of metrics,
25 pmNewContextZone executes a pmFetch(3) to retrieve the value for the
26 metric pmcd.timezone and uses that to set the current reporting time‐
27 zone.
28
29 In both cases, pmNewContextZone returns a value to identify the current
30 reporting timezone that may be used in a subsequent call to pmUse‐
31 Zone(3) to restore this reporting timezone.
32
34 PMAPI(3), pmCtime(3), pmFetch(3), pmGetConfig(3), pmLocaltime(3),
35 pmNewContext(3), pmNewZone(3), pmUseZone(3), pmWhichZone(3),
36 pcp.conf(4), pcp.env(4) and environ(5).
37
39 PM_ERR_NOCONTEXT
40 the current PMAPI context is not valid
41
42 other a return value less than zero indicates a fatal error from a
43 system call, most likely malloc(3C)
44
45
46
47Performance Co-Pilot SGI PMNEWCONTEXTZONE(3)