Re: Timestamp in the trace files

From: Steve Howard <stevedhoward_at_gmail.com>
Date: Wed, 6 Jan 2010 11:50:05 -0800 (PST)
Message-ID: <45959c60-7c49-4a48-8f19-e14774119dd5_at_h10g2000vbm.googlegroups.com>



On Jan 6, 2:27 pm, Mladen Gogala <n..._at_email.here.invalid> wrote:
> 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.
>
> --http://mgogala.byethost5.com

I wrote in Python something to do this that isn't perfect, but is close. It's actually pretty cheezy, too.

Basically, get the first time on the trace file, and that becomes your baseline...

 """

  • ACTION NAME:() 2009-10-01 09:00:01.757
  • MODULE NAME:(sqlplus_at_oh1xpwcdb01 (TNS V1-V3)) 2009-10-01 09:00:01.757
  • SERVICE NAME:(SYS$USERS) 2009-10-01 09:00:01.757
  • SESSION ID:(1212.19284) 2009-10-01 09:00:01.757 """ ...then get the first "tim=" value, and assume no time has transpired between the time printed above and this first time. Yeah, I said it was cheezy :)

Diff that tim= and all that follow, and add to the original time printed above. It will be within less than a second, anyway, which is usually close enough.

I have been messing around with a 10046 trace parser that does this kind of stuff for a year or so, and it still isn't finished, but I have used what I have and it has been very valuable. If someone wants a copy, let me know and I will upload it. Received on Wed Jan 06 2010 - 13:50:05 CST

Original text of this message