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

NAME

6       __pmParseTime, __pmParseHighResTime - 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       int __pmParseHighResTime(const char *string, struct timespec *logStart,
15               struct timespec *logEnd, struct timespec *rslt, char **errMsg);
16
17       cc ... -lpcp
18

CAVEAT

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

DESCRIPTION

28       __pmParseTime and __PmParseHighResTime are designed to encapsulate  the
29       interpretation  of  a time point specification in command line switches
30       for use by the PCP client tools.
31
32       These functions expects to be called with the time point  specification
33       as  string.   If  the  tool is running against PCP archive(s), you also
34       need to supply the start time of the first (only) archive as  logStart,
35       and  the end of the last (only) archive as logEnd.  See pmGetArchiveLa‐
36       bel(3) and pmGetArchiveEnd(3) for how to obtain values for these param‐
37       eters.  If the tool is running against a live feed of performance data,
38       logStart should be the current time (but could be aligned on  the  next
39       second  for example), while logEnd should have its tv_sec component set
40       to PM_MAX_TIME_T.
41
42       The rslt structure must be allocated before either  calling  __pmParse‐
43       Time or __pmParseHighResTime.
44
45       You  also  need to set the current PCP reporting time zone to correctly
46       reflect the -z and -Z command line parameters before calling __pmParse‐
47       Time  or __pmParseHighResTime.  See pmUseZone(3) and friends for infor‐
48       mation on how this is done.
49
50       If the conversion is successful, both __pmParseTime and  __pmParseHigh‐
51       ResTime  return  0, and fill in rslt with the time value defined by the
52       input parameters.  If the argument strings could not be parsed, it  re‐
53       turns  -1  and  a dynamically allocated error message string in errMsg.
54       Be sure to free(3) this error message string.
55

SEE ALSO

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