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

 
 Home
 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
 Analysis
 Design
 Implementation
 Oracle Support


 SQL Tuning
 Security

 Oracle UNIX
 Oracle Linux
 Monitoring
 Remote s
upport
 Remote plans
 Remote
services
 Application Server

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

 Remote S
upport  
 Development  

 Implementation


 Consulting Staff
 Consulting Prices
 Help Wanted!

 


 Oracle Posters
 Oracle Books

 Oracle Scripts
 Ion
 Excel-DB  

Don Burleson Blog 


 

 

 


 

 

 
 

v$osstat tips 

Oracle Database Tips by Donald BurlesonJanuary 1, 2015

Question:  I use your STATSPACK extension table for vmstat (stats$vmstat) and I have been quite happy with my IS stats.  I now understand that Oracle offers a view with limited OS data, called v$osstat.  Is v$osstat better than a custom OS statistics collection?

Answer:  Traditionally, Oracle ran in a vacuum, and you had to go "outside" of Oracle to measure CPU, RAM, Network and disk spindle I/O bottlenecks.  However, Oracle has now advanced and an instance samples its external environment placing OS data into v$osstat, dba_hist_system_event

The v$osstat is created by querying the gv$osstat view, slicing-off data for each specific instance on the server:

select
   stat_name,
   value,
   osstat_id,
   comments,
   cumulative
from
   gv$osstat
where
   inst_id = userenv('instance')

Oracle has several views that collect OS information, namely v$osstat, stats$osstat, stats$osstatname and dba_hist_osstat.

Still, many DBAs will write custom scripts to gather OS statistics, collecting from OS tools such as vmstat and placing the data into STATSPACK extension tables for trend analysis.

Querying from v$osstat ensures that an Oracle performance problem is not constrained by an external OS bottleneck. 

select * from v$osstat;
select * from dba_hist_osstat;
select * from dba_hist_system_event;

-- If you don't want to pay the fee to purchase AWR, use my vmstat table

select * from stats$vmstat

The v$osstat view has the following important run-time statistics:

  • idle_time:  The number (in hundredths of a second) that a processor has been idle, totaled over all processors

  • busy_time: The number(in hundredths of a second) that a processor has been busy executing user or kernel code, totaled over all processors

  • user_time: The number (in hundredths of a second) that a processor has been busy executing user code, totaled over all processors

  • sys_time: The number (in hundredths of a second) that a processor has been busy executing kernel code, totaled over all processors

  • iowait_time: The number (in hundredths of a second) that a processor has been waiting for I/O to complete, totaled over all processors

  • os_cpu_wait_time: The total number (in hundredths of a second) that processes have been in a ready state, waiting to be selected by the operating system scheduler to run

  • vm_page_in_bytes: Total number of bytes of data that have been paged in due to virtual memory paging

  • physical_memory_bytes: Total number of bytes of physical memory

  • load Current number of processes that are either running or in the ready state, waiting to be selected by the operating-system scheduler to run. On many platforms, this statistic reflects the average load over the past minute.

As we see, these are the same metrics that we can get from OS tools such as vmstat, top and glance, but they are ready to inspect within this Oracle view.

In addition to using v$osstat if you buy are extra cost AWR you can query the dba_hist_system_event table.

If you don't want to write your own OS monitoring scripts you can download a full set of Oracle OS monitoring scripts.

Advanced DBAs can use the techniques from my book Oracle Tuning: The Definitive Reference to enhance the v$osstat data with easy OS statistics collection.
 
Get the Complete
Oracle SQL Tuning Information 

The landmark book "Advanced Oracle SQL Tuning  The Definitive Reference"  is filled with valuable information on Oracle SQL Tuning. This book includes scripts and tools to hypercharge Oracle 11g performance and you can buy it for 30% off directly from the publisher.

 

 

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 -  2020

All rights reserved by Burleson

Oracle ® is the registered trademark of Oracle Corporation.

 

 

��  
 
 
Oracle Training at Sea
 
 
 
 
oracle dba poster
 

 
Follow us on Twitter 
 
Oracle performance tuning software 
 
Oracle Linux poster