X

Alejandro Vargas' Blog

  • December 10, 2009

Check IO Scripts

Alejandro Vargas
Technical Leader, ACS Global Delivery, Infrastructure & BigData

These scripts are very useful to check throughput.

The original version can be found on My Oracle Support Note 422414.1 by Luca Canali.

set lines 250 pages 50000

alter session set nls_date_format='dd-mm-yyyy hh24:mi';

col Phys_Read_Total_Bps for 999999999999

col Phys_Write_Total_Bps for 999999999999

col Redo_Bytes_per_sec for 999999999999

col Phys_Read_IOPS for 999999999999

col Phys_write_IOPS for 999999999999

col Phys_redo_IOPS for 999999999999

col OS_LOad for 999999999999

col DB_CPU_Usage_per_sec for 999999999999

col Host_CPU_util for 999999999999

col Network_bytes_per_sec for 999999999999

col Phys_IO_Tot_MBps for 999999999999

col Phys_IOPS_Tot for 999999999999

spool io_max_checkup.log

select min(begin_time), max(end_time),

sum(case metric_name when 'Physical Read Total Bytes Per Sec' then maxval end) Phys_Read_Tot_Bps,

sum(case metric_name when 'Physical Write Total Bytes Per Sec' then maxval end) Phys_Write_Tot_Bps,

sum(case metric_name when 'Redo Generated Per Sec' then maxval end) Redo_Bytes_per_sec,

sum(case metric_name when 'Physical Read Total IO Requests Per Sec' then maxval end) Phys_Read_IOPS,

sum(case metric_name when 'Physical Write Total IO Requests Per Sec' then maxval end) Phys_write_IOPS,

sum(case metric_name when 'Redo Writes Per Sec' then maxval end) Phys_redo_IOPS,

sum(case metric_name when 'Current OS Load' then maxval end) OS_LOad,

sum(case metric_name when 'CPU Usage Per Sec' then maxval end) DB_CPU_Usage_per_sec,

sum(case metric_name when 'Host CPU Utilization (%)' then maxval end) Host_CPU_util, --NOTE 100% = 1 loaded RAC node

sum(case metric_name when 'Network Traffic Volume Per Sec' then maxval end) Network_bytes_per_sec,

snap_id

from dba_hist_sysmetric_summary

group by snap_id

order by snap_id;

spool off

spool io_maxtot_summary.log

select min(begin_time), max(end_time),

sum(case metric_name when 'Physical Read Total Bytes Per Sec' then maxval end)/1024/1024 +

sum(case metric_name when 'Physical Write Total Bytes Per Sec' then maxval end)/1024/1024 +

sum(case metric_name when 'Redo Generated Per Sec' then maxval end)/1024/1024 Phys_IO_Tot_MBps,

sum(case metric_name when 'Physical Read Total IO Requests Per Sec' then maxval end) +

sum(case metric_name when 'Physical Write Total IO Requests Per Sec' then maxval end) +

sum(case metric_name when 'Redo Writes Per Sec' then maxval end) Phys_IOPS_Tot,

sum(case metric_name when 'Current OS Load' then maxval end) OS_LOad,

sum(case metric_name when 'CPU Usage Per Sec' then maxval end) DB_CPU_Usage_per_sec,

sum(case metric_name when 'Host CPU Utilization (%)' then maxval end) Host_CPU_util, --NOTE 100% = 1 loaded RAC node

sum(case metric_name when 'Network Traffic Volume Per Sec' then maxval end) Network_bytes_per_sec,

snap_id

from dba_hist_sysmetric_summary

group by snap_id

order by snap_id;

spool off

Join the discussion

Comments ( 2 )
  • Luca Saturday, December 12, 2009
    Hi Alejandro,
    It's worth mentioning Metalink Note 422414.1 too. BTW the same type of queries can become very useful for capacity planning. On that respect we find useful to move AWR data to a 'performance repository' where performance data is stored for the life of the DB and analysis with queries such as the one above is done. A graphical display can be added for better undesratnding of the trend.
    More details: http://techandebs.ukoug.org/default.asp?p=3227&dlgact=shwprs&prs_prsid=3684&day_dayid=33
    Cheers,
    Luca
  • guest Sunday, December 13, 2009
    Luca,
    Thanks for the comment, and your excellent scripts.
    The second script you posted on Note 422414.1 "Manual querying AWR for trend analysis and capacity planning" is very interesting also, I usually recommend our Customers to use services even on single instance, to be able to get trend information as you suggest.
    Best Regards,
    Alejandro
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.Captcha
Oracle

Integrated Cloud Applications & Platform Services