BC remote Oracle DBA - Call (800) 766-1884  
Oracle Consulting Oracle Training Development

Remote DBA

Remote DBA Plans  

Remote DBA Service

Remote DBA RAC

   
Remote DBA Oracle Home
Remote DBA Oracle Training
Remote DBA SQL Tuning Consulting
Remote DBA Oracle Tuning Consulting
Remote DBA Data Warehouse Consulting
Remote DBA Oracle Project Management
Remote DBA Oracle Security Assessment
Remote DBA Unix Consulting
Burleson Books
Burleson Articles
Burleson Web Courses
Burleson Qualifications
Oracle Links
Remote DBA Oracle Monitoring
Remote DBA Support Benefits
Remote DBA Plans & Prices
Our Automation Strategy
What We Monitor
Oracle Apps Support
Print Our Brochure
Contact Us (e-mail)
Oracle Job Opportunities
Oracle Consulting Prices





   

 

 

 

Remote DBA services

Remote DBA Support

Remote DBA RAC

Remote DBA Reasons

Remote Oracle Tuning

Remote DBA Links

Oracle DBA Support

Oracle DBA Forum

Oracle Disaster

Oracle Training

Oracle Tuning

Oracle Training

 Remote DBA SQL Server

Remote MSSQL Consulting

Oracle DBA Hosting

Oracle License Negotiation

 

 


 

 

 

 

 
 

Checking Server Trends by Hour

Oracle Tips by Burleson Consulting

Returning to our basic script, we can easily modify it to capture CPU usage, averaged by hour of the day. Note that all we need to do is to change the date format mask from ’yyyy-mm-dd’ to ’HH24.’

(3)rpt_vmstat_hr.sql

connect perfstat/perfstat;
set pages 9999;

set feedback off;
set verify off;

column my_date heading 'date' format a20
column c2      heading runq   format 999
column c3      heading pg_in  format 999
column c4      heading pg_ot  format 999
column c5      heading usr    format 999
column c6      heading sys    format 999
column c7      heading idl    format 999
column c8      heading wt     format 999


select
   to_char(start_date,'HH24') my_date,
-- avg(runque_waits)       c2
--  avg(page_in)            c3
-- avg(page_out)           c4,
avg(user_cpu + system_cpu)           c5
-- avg(system_cpu)         c6,
-- avg(idle_cpu)           c7,
-- avg(wait_cpu)           c8
from
    stats$vmstat
group  BY
   to_char(start_date,'HH24')
order by
   to_char(start_date,'HH24')
;

Now, when we run this script, we get the average CPU usage data:

date                  usr
-------------------- ----
00                     15
01                     13
02                     13
03                     16
04                     15
05                     14
06                     13
07                     14
08                     17
09                     20
10                     21
11                     21
12                     31
13                     34
14                     37
15                     34
16                     21
17                     21
18                     22
19                     21
20                     19
21                     18
22                     16
23                     15

When we plot this data, we clearly see the server gets very busy each day at noon and continues until 3:00 p.m. (see Figure 15-11).

Figure 15-124: A plot of CPU use by hour of the day

Next, let's modify the script and see trends by day of the week.

Plotting Server Statistics by Day of the Week

Next, we change the dat string from ’HH24’ to ’day’. This will aggregate the statistics by day of the week. When we run the script, we see the average CPU by day of the week.

date                  usr
-------------------- ----
friday                 18
monday                 53
saturday               14
sunday                 14
thursday               20
tuesday                55
wednesday              20

When we plot this data, we see that Monday and Tuesday are the busiest processing days of the week (see Figure 15-12).

Figure 15-125: A plot of CPU % by day of week


This is an excerpt from "Oracle9i High Performance tuning with STATSPACK" by Oracle Press.


If you like Oracle tuning, you may enjoy the new book "Oracle Tuning: The Definitive Reference", over 900 pages of BC's favorite tuning tips & scripts. 

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


Expert Remote DBA

BC is America's oldest and largest Remote DBA Oracle support provider.  Get real Remote DBA experts, call
BC Remote DBA today.

 

   

 

Remote DBA Service
 

Oracle Tuning Book

 

Advance SQL Tuning Book 

BC Oracle support

Oracle books by Rampant

Oracle monitoring software

 

 

 

 

 

 

BC Remote Oracle Support

Remote DBA

Remote DBA Services

Copyright © 1996 -  2013 by Burleson. All rights reserved.

Oracle® is the registered trademark of Oracle Corporation.



Hit Counter