Call now: 252-767-6166  
Oracle Training Oracle Support Development Oracle Apps

 E-mail Us
 Oracle Articles
New Oracle Articles

 Oracle Training
 Oracle Tips

 Oracle Forum
 Class Catalog

 Remote DBA
 Oracle Tuning
 Emergency 911
 RAC Support
 Apps Support
 Oracle Support

 SQL Tuning

 Oracle UNIX
 Oracle Linux
 Remote s
 Remote plans
 Application Server

 Oracle Forms
 Oracle Portal
 App Upgrades
 SQL Server
 Oracle Concepts
 Software Support

 Remote S


 Consulting Staff
 Consulting Prices
 Help Wanted!


 Oracle Posters
 Oracle Books

 Oracle Scripts

Don Burleson Blog 







Operating System OS Statistics in AWR

Oracle Tips by Burleson Consulting

Operating System Statistics in AWR

Operating system (OS) statistics such as CPU, disk input/output (I/O), virtual memory, and network statistics help identify possible bottlenecks where system hardware is stressed.


The AWR has a view called dba_hist_osstat  that stores snapshots of the v$osstat dynamic view.  OS statistics indicate how the hardware and OS are working, and thus, they reflect the workload placed on the database. These statistics can give an indication of where to first search the database for possible hot spots.


The structure of dba_hist_osstat  view is:




Name                                      Null?    Type

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

SNAP_ID                                            NUMBER

DBID                                               NUMBER

INSTANCE_NUMBER                                    NUMBER

STAT_ID                                            NUMBER

STAT_NAME                                          VARCHAR2(64)

VALUE                                              NUMBER


To view history statistics for a particular snapshot interval, the os_stat_int_10g.sql query can be used:





select e.stat_name "Statistic Name"

     , decode(e.stat_name, 'NUM_CPUS', e.value, e.value - b.value) "Total"

     , decode( instrb(e.stat_name, 'BYTES'), 0, to_number(null)

             , round((e.value - b.value)/( select

       avg( extract( day from (e1.end_interval_time-b1.end_interval_time) )*24*60*60+

           extract( hour from (e1.end_interval_time-b1.end_interval_time) )*60*60+

           extract( minute from (e1.end_interval_time-b1.end_interval_time) )*60+

           extract( second from (e1.end_interval_time-b1.end_interval_time)) )    

      from dba_hist_snapshot  b1

          ,dba_hist_snapshot  e1

     where b1.snap_id         = b.snap_id

       and e1.snap_id         = e.snap_id

       and b1.dbid            = b.dbid

       and e1.dbid            = e.dbid

       and b1.instance_number = b.instance_number

       and e1.instance_number = e.instance_number

       and b1.startup_time    = e1.startup_time

       and b1.end_interval_time < e1.end_interval_time ),2)) "Per Second"

 from  dba_hist_osstat  b

     , dba_hist_osstat  e

 where b.snap_id         = &pBgnSnap

   and e.snap_id         = &pEndSnap

   and b.dbid            = &pDbId


 order by 1 asc;


The query output looks like the following:


SQL> @os_stat_int_10g.sql


Statistic Name                      Total    Per Second

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

AVG_BUSY_TICKS                    1,974,925

AVG_IDLE_TICKS                    7,382,241

AVG_IN_BYTES                  2,236,256,256  23,881.91

AVG_OUT_BYTES                   566,304,768     6047.8

AVG_SYS_TICKS                       727,533

AVG_USER_TICKS                    1,247,392

BUSY_TICKS                        1,974,925

IDLE_TICKS                        7,382,241

IN_BYTES                      2,236,256,256  23,881.91

NUM_CPUS                                  1

OUT_BYTES                       566,304,768    6,047.8

SYS_TICKS                           727,533

USER_TICKS                         1247,392


The os_stat_int_10g.sql script allows a view of OS statistics in two forms: cumulative and per second. Thus, users are able to identify hot areas in the OS and hardware.


The Ion tool has a corresponding report called OS Statistics that is used to produce history charts.  Figure 4.14 is a representation of the results of the OS Statistics from the AWR interval.


Figure 4.14:  AWR OS Statistics chart in Ion*


The above sample Ion screenshot displays a sample chart produced by the OS Statistics report. This chart allows the identification of times when operating system experienced the most workload and overhead during the snapshot interval observed.


The next section describes the very important dba_hist views that contain performance history information for SQL statements executed in the Oracle10g database.




This is an excerpt from my latest book "Oracle Tuning: The Definitive Reference". 

You can buy it direct from the publisher for 30%-off and get instant access to the code depot of Oracle tuning scripts:




Oracle Training at Sea
oracle dba poster

Follow us on Twitter 
Oracle performance tuning software 
Oracle Linux poster


Burleson is the American Team

Note: This Oracle documentation was created as a support and Oracle training reference for use by our DBA performance tuning consulting professionals.  Feel free to ask questions on our Oracle forum.

Verify experience! Anyone considering using the services of an Oracle support expert should independently investigate their credentials and experience, and not rely on advertisements and self-proclaimed expertise. All legitimate Oracle experts publish their Oracle qualifications.

Errata?  Oracle technology is changing and we strive to update our BC Oracle support information.  If you find an error or have a suggestion for improving our content, we would appreciate your feedback.  Just  e-mail:  

and include the URL for the page.


Burleson Consulting

The Oracle of Database Support

Oracle Performance Tuning

Remote DBA Services


Copyright © 1996 -  2017

All rights reserved by Burleson

Oracle ® is the registered trademark of Oracle Corporation.

Remote Emergency Support provided by Conversational