Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: CPU Time calculation in AWR Reports

RE: CPU Time calculation in AWR Reports

From: Tanel Poder <tanel.poder.003_at_mail.ee>
Date: Fri, 02 Nov 2007 01:10:30 +0800
Message-id: <036601c81caa$1b270820$3201a8c0@windows01>


Well you can trace the awrrpt run...

I suspect (but don't know for sure) that AWR uses DBA_HIST_SYS_TIME_MODEL for its CPU info... V$SYS_TIME_MODEL CPU values can differ from V$SYSSTAT ones...

SQL> select

  2     a.value/1000000 time_model_seconds,
  3     b.value/10000   sysstat_seconds,
  4     a.value/1000000 - b.value/10000 missing_seconds
  5  from
  6     v$sys_time_model a,
  7     v$sysstat b
  8  where
  9     a.stat_name = 'DB CPU'

 10 and b.name = 'CPU used by this session'  11 /

TIME_MODEL_SECONDS SYSSTAT_SECONDS MISSING_SECONDS

------------------ --------------- ---------------
        126.997282          4.6276      122.369682


--
Regards,
Tanel Poder
http://blog.tanelpoder.com
 


> -----Original Message-----
> From: oracle-l-bounce_at_freelists.org
> [mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Luis
> Fernando Cerri
> Sent: Thursday, November 01, 2007 23:20
> To: oracle-l_at_freelists.org
> Subject: CPU Time calculation in AWR Reports
>
> Hello, list.
>
> At Statspack age, 'CPU Time' value in section 'Top 5 Timed
> Events' was calculated as the difference of 'CPU used by this
> session' values between two snapshots:
>
> select 'CPU' , (e.value-b.value)/100 time
> from stats$sysstat b, stats$sysstat e
> where e.snap_id = :v_eid
> and b.snap_id = :v_bid
> and e.name = 'CPU used
> by this session'
> and b.name = 'CPU used
> by this session';
>
>
-- http://www.freelists.org/webpage/oracle-l
Received on Thu Nov 01 2007 - 12:10:30 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US