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 


 

 

 


 

 

 
 

Plotting Oracle CPU Utilization percentage

Oracle Database Tips by Donald BurlesonApril 20,  2015

Plotting Oracle CPU Utilization percentage

Oracle does not exist in a vacuum, and you need to monitor external influences such as CPU enqueues (when the runqueue exceeds the number of [processors on your server), plus RAM swapping, network latency and disk enqueues.

For plotting CPU, we compute the deltas of "busy" and "idle" time and use "busy / (busy + idle)" to get a CPU utilization percentage.

Please note, some of the OS statistics may be difficult, as they differ based on every server operating system, but the CPU BUSY and CPU IDLE time are constant across OS implementations.

Charting CPU utilization over time

select 'OS Busy Time' series, to_char(snaptime, 'yyyy-mm-dd hh24') snap_time, round(busydelta / (busydelta + idledelta) * 100, 2) "CPU Use (%)"
from (
select s.begin_interval_time snaptime,
os1.value - lag(os1.value) over (order by s.snap_id) busydelta,
os2.value - lag(os2.value) over (order by s.snap_id) idledelta
from dba_hist_snapshot s, dba_hist_osstat os1, dba_hist_osstat os2
where
s.snap_id = os1.snap_id and s.snap_id = os2.snap_id
and s.instance_number = os1.instance_number and s.instance_number = os2.instance_number
and s.dbid = os1.dbid and s.dbid = os2.dbid
and s.instance_number = (select instance_number from v$instance)
and s.dbid = (select dbid from v$database)
and os1.stat_name = 'BUSY_TIME'
and os2.stat_name = 'IDLE_TIME'
and s.snap_id between &beginsnap and &endsnap
)

For more scripts for plotting Oracle metrics, see The Oracle script collection.


 

 

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

All rights reserved by Burleson

Oracle ® is the registered trademark of Oracle Corporation.