Re: Timestamp in the trace files
From: Maxim Demenko <mdemenko_at_gmail.com>
Date: Wed, 06 Jan 2010 21:02:31 +0100
Message-ID: <4B44EC57.2060808_at_gmail.com>
On 06.01.2010 20:27, Mladen Gogala wrote:
> On Wed, 06 Jan 2010 19:37:14 +0100, Maxim Demenko wrote:
>
>> On 06.01.2010 19:02, Mladen Gogala wrote:
>>> On Wed, 06 Jan 2010 17:40:43 +0000, Mladen Gogala wrote:
>>>
>>>> I am analyzing a trace file and the developer asked me when has this
>>>> event taken place:
>>>>
>>>> =====================
>>>> PARSING IN CURSOR #3 len=159 dep=0 uid=141 oct=3 lid=141
>>>> tim=1233122414291746 hv=3402358638 ad='9a174550' select
>>>> folderarti0_.segment# as col_0_0_, folderarti0_.FOLDER# as col_1_0_
>>>> from FOLDER_ARTICLES folderarti0_ where folderarti0_.segment# in (:1 ,
>>>> :2 , :3 , :4)
>>>> END OF STMT
>>>>
>>>> In other words, how can I convert the "tim" field into time and date?
>>>
>>> Please ignore. I figured it out. The "tim" field represents the
>>> difference in microseconds. It's not the real time.That should be an
>>> improvement request that one would have to send to Oracle.
>>>
>>>
>>>
>>>
>> May it help?
>> http://www.freelists.org/post/oracle-l/Oracle-10046-tim-e-and-ela-
> Values-use-Nanoseconds1024-not-Microseconds-on-some-Platforms
>>
>> http://www.freelists.org/post/oracle-l/Trace-file-tim-values
>>
>> Best regards
>>
>> Maxim
>
> This is not really helpful. The application has run on 05-Jan-2009. Here
> is what I get when I try using "seconds from 1970":
>
> Copyright 1991-1994, 1997, 1998, 2000, 2004, 2006 Free Software
> Foundation, Inc.
> This is free software with ABSOLUTELY NO WARRANTY.
> For details type `warranty'.
> 1233122401969823/1000000
> 1233122401
> scale=2
> 1233122401969823/1000000
> 1233122401.96
> 1233122402
> 1233122402
> mgogala_at_nycwxp2622:~$ perl -e '_at_dt=localtime(1233122402); printf("%d.%d.%d
> \n",$dt[4],$dt[3],$dt[5]);'
> 0.28.109
>
> The result is January 28th, 2009, which is almost a year off.
>
>
>
05.01.2010 18:49:12
Date: Wed, 06 Jan 2010 21:02:31 +0100
Message-ID: <4B44EC57.2060808_at_gmail.com>
On 06.01.2010 20:27, Mladen Gogala wrote:
> On Wed, 06 Jan 2010 19:37:14 +0100, Maxim Demenko wrote:
>
>> On 06.01.2010 19:02, Mladen Gogala wrote:
>>> On Wed, 06 Jan 2010 17:40:43 +0000, Mladen Gogala wrote:
>>>
>>>> I am analyzing a trace file and the developer asked me when has this
>>>> event taken place:
>>>>
>>>> =====================
>>>> PARSING IN CURSOR #3 len=159 dep=0 uid=141 oct=3 lid=141
>>>> tim=1233122414291746 hv=3402358638 ad='9a174550' select
>>>> folderarti0_.segment# as col_0_0_, folderarti0_.FOLDER# as col_1_0_
>>>> from FOLDER_ARTICLES folderarti0_ where folderarti0_.segment# in (:1 ,
>>>> :2 , :3 , :4)
>>>> END OF STMT
>>>>
>>>> In other words, how can I convert the "tim" field into time and date?
>>>
>>> Please ignore. I figured it out. The "tim" field represents the
>>> difference in microseconds. It's not the real time.That should be an
>>> improvement request that one would have to send to Oracle.
>>>
>>>
>>>
>>>
>> May it help?
>> http://www.freelists.org/post/oracle-l/Oracle-10046-tim-e-and-ela-
> Values-use-Nanoseconds1024-not-Microseconds-on-some-Platforms
>>
>> http://www.freelists.org/post/oracle-l/Trace-file-tim-values
>>
>> Best regards
>>
>> Maxim
>
> This is not really helpful. The application has run on 05-Jan-2009. Here
> is what I get when I try using "seconds from 1970":
>
> Copyright 1991-1994, 1997, 1998, 2000, 2004, 2006 Free Software
> Foundation, Inc.
> This is free software with ABSOLUTELY NO WARRANTY.
> For details type `warranty'.
> 1233122401969823/1000000
> 1233122401
> scale=2
> 1233122401969823/1000000
> 1233122401.96
> 1233122402
> 1233122402
> mgogala_at_nycwxp2622:~$ perl -e '_at_dt=localtime(1233122402); printf("%d.%d.%d
> \n",$dt[4],$dt[3],$dt[5]);'
> 0.28.109
>
> The result is January 28th, 2009, which is almost a year off.
>
>
>
How that? In the first link i supplied, was suggested, on linux and solaris tim values are in nanoseconds/1024. This suggestion fits perfectly in your example:
SQL> select date '1970-01-01' + (1233122414291746 * 1024 * 1e-9 /60/60/24 )
2 from dual;
DATE'1970-01-01'+(1
05.01.2010 18:49:12
Best regards
Maxim Received on Wed Jan 06 2010 - 14:02:31 CST