Re: Source for tim=nnnnn in 10046 trace

From: rjamya <rjamya_at_gmail.com>
Date: Fri, 23 Aug 2013 21:08:19 -0400
Message-ID: <CAGurbTP80pMcL4qpYsxDYynxH76hOWudXX2+tbtN4k=uW6a-5Q_at_mail.gmail.com>



Thank you all for the information and ideas, however something doesn't fit here ... or it could just be my math :)

This is from my host ...

-> uname -a
Linux myhost 2.6.18-238.9.1.0.1.el5 #1 SMP Tue Apr 12 19:58:35 EDT 2011 x86_64 x86_64 x86_64 GNU/Linux

->last reboot

reboot   system boot  2.6.18-238.9.1.0 Wed Jun 26 17:12         (57+22:15)
reboot   system boot  2.6.18-238.9.1.0 Wed Jun 26 16:49          (00:22)

wtmp begins Wed Jun 26 16:49:17 2013


These are beginning lines from a simple 10046 trace file

  • 2013-08-23 15:24:25.823
  • SESSION ID:(153.12935) 2013-08-23 15:24:25.823
  • CLIENT ID:() 2013-08-23 15:24:25.823
  • SERVICE NAME:(SYS$USERS) 2013-08-23 15:24:25.823
  • MODULE NAME:(sqlplus_at_somehost.somewhere (TNS V1-V3)) 2013-08-23 15:24:25.823
  • ACTION NAME:() 2013-08-23 15:24:25.823
WAIT #47561771746056: nam='SQL*Net message to client' ela= 2 driver id=1650815232 #bytes=1 p3=0 obj#=-1 tim=1377285865823053 << lets use this
  • 2013-08-23 15:24:31.018 WAIT #47561771746056: nam='SQL*Net message from client' ela= 5195574 driver id=1650815232 #bytes=1 p3=0 obj#=-1 tim=1377285871018953 CLOSE #47561771746056:c=0,e=13,dep=0,type=1,tim=1377285871019108

Now I'll take a tim value and try to convert it

alter session set nls_date_format='mm/dd/yyyy hh24:mi:ss'; set numwidth 20 line 120
with x as (select 1377285865823053 as t, (1377285865823053/1e6) as t1 from dual)
select t tim_micro, t1 tim_sec, sysdate curr_sysdate, sysdate-(t1/86400) derived_sysdate
from x;

           TIM_MICRO TIM_SEC CURR_SYSDATE  DERIVED_SYSDATE

-------------------- -------------------- ---------------------
---------------------

    1377285865823053 1377285865.823053 08/23/2013 15:29:42 12/31/1969 20:05:16

something doesn't match up,

tim is neither time from epoch, not it is from last system reboot on my system or why bother ? even if i factor GMT it is still off by over 5 minutes.

Raj

On Fri, Aug 23, 2013 at 12:24 PM, Niall Litchfield < niall.litchfield_at_gmail.com> wrote:

> Raj
>
> At least on Linux (but probably everywhere *nix) the times come from the
> gettimeofday system call. Last time I looked on Windows it was time since
> last boot (but that was no later than 9i and might have been 8i).
> gettimeofday should be documented but from memory is Jan 1 1970
>

--
http://www.freelists.org/webpage/oracle-l
Received on Sat Aug 24 2013 - 03:08:19 CEST

Original text of this message