PMPARSECTIME(3) Library Functions Manual PMPARSECTIME(3)NAME
__pmParseCtime - convert ctime(3) string to tm structure
C SYNOPSIS
#include <pcp/pmapi.h>
#include <pcp/impl.h>
int __pmParseCtime(const char *string, struct tm *rslt, char **errmsg);
cc ... -lpcp
DESCRIPTION
__pmParseCtime reverses the asctime(3C) function. It accepts a string specifying a time, and fills in the given tm structure.
Either a fully specified asctime(3C) string like "Mon Mar 4 13:07:47 1996" or a partially specified time like '1996", "Mar 1996", "Mar 4
1996", "Mar", "13:07:47", "13:07", "Mar 4 13:07:47",... is accepted. In addition, the seconds component may be a floating point number,
for example "13:07:47.5". The 12 hour clock is also supported, so "13:07" and "1:07 pm" are equivalent.
__pmParseCtime returns 0 if successful. It returns -1 and a dynamically allocated error message string in errmsg, if the given string does
not parse. Be sure to free(3C) the error message string.
The tm structure returned in rslt should only be used as an argument to the __pmConvertTime function, as it contains encoded information
that will only be correctly interpreted by __pmConvertTime.
SEE ALSO PMAPI(3), pmParseInterval(3), __pmConvertTime(3) and __pmParseTime(3).
Performance Co-Pilot PCP PMPARSECTIME(3)
Check Out this Related Man Page
PMCONVERTTIME(3) Library Functions Manual PMCONVERTTIME(3)NAME
__pmConvertTime - convert tm structure to timeval structure
C SYNOPSIS
#include <pcp/pmapi.h>
#include <pcp/impl.h>
int __pmConvertTime(struct tm *tmin, struct timeval *origin, struct timeval *rslt);
cc ... -lpcp
DESCRIPTION
__pmConvertTime accepts a tm structure that has been filled in by __pmParseCtime(3) and a reference time point origin, and fills in the
given rslt structure with the time the user meant when he specified a partial ctime or positive or negative time interval.
Typically, the argument origin is the start time for a PCP archive log, unless the user specified a negative interval offset, in which case
it is the end time of the log.
__pmConvertTime returns 0 if successful. It returns -1 and writes an error message to stderr, if an error is detected.
Use pmNewZone(3), pmNewContextZone(3) or pmUseZone(3) to establish a new current timezone that will effect __pmConvertTime.
SEE ALSO PMAPI(3), pmNewContextZone(3), pmNewZone(3), pmParseInterval(3), pmParseTimeWindow(3), pmUseZone(3), __pmParseCtime(3) and __pmParse-
Time(3).
Performance Co-Pilot PCP PMCONVERTTIME(3)
Hi,
How to strip a portion of a file name from behind...Say for Eg..i have a file name like aaaaa.bbbbb.Mar-17-2007
i want to remove .Mar-17-2007...is there a one line command which can give this output...
Thanks
Kumar (5 Replies)
I am working on a file with specific timestamps.
I want to delete all the lines above the timestamp 18:31. I tried using the following command but it deleted 18:31 also.
sed '1,/18:/d' <file-name>
Some quick help will be appreciated !!!!!! :) (9 Replies)
Hi,
It seems someone has created files instead of actually running the commands, as below:
-rw-r--r-- 1 oracle92 dba 0 Mar 2 11:19 PRIML_070302.ok
-rw-r--r-- 1 oracle92 dba 557 Mar 2 11:20 PRIVH_070302.dat
-rw-r--r-- 1 oracle92 dba 0 Mar 12 11:57... (2 Replies)
I want to print the current and next line of "Mar 02" in the file.
Input
Mon Mar 02 11:07:02 2009
ABC
Tue Mar 03 11:02:20 2010
Wrong data
Mon Mar 02 11:07:02 2009
XYZ
Mon Mar 02 11:07:08 2010
124
Mon Mar 02 11:07:08 2010
1400
Output
Mon Mar 02 11:07:02 2009
ABC
Mon Mar 02... (6 Replies)
Hello,
I have a series of logs that I need to analyse.
each looks something like:234.10.72.175 Mon Mar 02 20:25:00 GMT 2009
226.91.87.86 Thu Mar 05 03:50:26 GMT 2009
226.91.87.86 Thu Mar 05 04:06:07 GMT 2009
Using awk, so far I have been able to count the lines in a... (5 Replies)
Hi All,
Can anyone give me the command to copy files from 03-Mar-2013 to 07-Mar-2013 in folder.
there are nearly 40+ thousand files in directory , so I just need files from Mar 3rd to Mar 7th and copy them to a location .
Need quick help pls (2 Replies)