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

NAME

6       __pmParseTime - parse time point specification
7

C SYNOPSIS

9       #include "pmapi.h"
10       #include "libpcp.h"
11
12       int __pmParseTime(const char *string, struct timeval *logStart,
13               struct timeval *logEnd, struct timeval *rslt, char **errMsg);
14
15       cc ... -lpcp
16

CAVEAT

18       This documentation is intended for internal Performance Co-Pilot  (PCP)
19       developer use.
20
21       These  interfaces  are  not part of the PCP APIs that are guaranteed to
22       remain fixed across releases, and they may not  work,  or  may  provide
23       different semantics at some point in the future.
24

DESCRIPTION

26       __pmParseTime  is  designed to encapsulate the interpretation of a time
27       point specification in command line switches for use by the PCP  client
28       tools.
29
30       This function expects to be called with the time point specification as
31       string.  If the tool is running against PCP archive(s), you  also  need
32       to  supply  the start time of the first (only) archive as logStart, and
33       the end of the last (only) archive as logEnd.  See pmGetArchiveLabel(3)
34       and  pmGetArchiveEnd(3)  for how to obtain values for these parameters.
35       If the tool is  running  against  a  live  feed  of  performance  data,
36       logStart  should  be the current time (but could be aligned on the next
37       second for example), while logEnd should have its tv_sec component  set
38       to INT_MAX.
39
40       The rslt structure must be allocated before calling __pmParseTime.
41
42       You  also  need to set the current PCP reporting time zone to correctly
43       reflect the -z and -Z command line parameters before calling __pmParse‐
44       Time.   See  pmUseZone(3)  and  friends  for information on how this is
45       done.
46
47       If the conversion is successful, __pmParseTime returns 0, and fills  in
48       rslt with the time value defined by the input parameters.  If the argu‐
49       ment strings could not be parsed, it returns -1 and a dynamically allo‐
50       cated  error  message  string in errMsg.  Be sure to free(3) this error
51       message string.
52

SEE ALSO

54       PMAPI(3),    pmGetArchiveEnd(3),    pmGetArchiveLabel(3),     pmNewCon‐
55       textZone(3),  pmNewZone(3),  pmParseInterval(3),  pmParseTimeWindow(3),
56       pmUseZone(3), __pmConvertTime(3) and __pmParseCtime(3).
57
58
59
60Performance Co-Pilot                  PCP                       PMPARSETIME(3)
Impressum