Gvasmdsk (gvasmdsk.sql)
What This Script Does
Section titled “What This Script Does”This script monitors ASM disk I/O performance, calculating average read and write times per operation and tracking I/O errors. Essential for identifying slow disks and potential hardware issues in ASM environments.
The Script
Section titled “The Script”rem gvasmdsk.sqlremset linesize 300set pagesize 200remttitle 'ASM Disk Perf. Info'rem
col GROUP_NUMBER format 999 heading 'GRP|NBR'col DISK_NUMBER format 999 heading 'DSK|NBR'col PATH format a35 heading 'Path'col READS format 999,999,999col READ_TIME format 999,999,999.99 heading 'Read Time|Hundreths of Sec'col READ_ERRS format 999,999 heading 'READ|ERR'col WRITES format 999,999,999col WRITE_TIME format 999,999,999.99 heading 'Write Time|Hundreths of Sec'col WRITE_ERRS format 999,999 heading 'WRITE|ERR'
select GROUP_NUMBER ,DISK_NUMBER ,PATH ,READS ,READ_TIME/READS READ_TIME ,READ_ERRS ,WRITES ,WRITE_TIME/WRITES WRITE_TIME ,WRITE_ERRS from gv$asm_diskwhere reads is not null or writes is not null order by group_number ,disk_number;
Parameters
Section titled “Parameters”The script prompts for:
- None - this script requires no parameters## Usage
-- Basic usage@gvasmdsk.sql
Sample Output
Section titled “Sample Output”ASM Disk Perf. Info
GRP DSK Read Time Write TimeNBR NBR Path READS Hundreths of Sec READ WRITES Hundreths of Sec WRITE--- --- ----------------------------------- ------------ ---------------- ------- ------------ ---------------- ------- 1 0 /dev/raw/raw1 1,234,567 0.85 0 2,345,678 1.25 0 1 1 /dev/raw/raw2 1,345,678 0.92 0 2,456,789 1.18 0 1 2 /dev/raw/raw3 1,123,456 1.35 2 2,234,567 1.45 1 1 3 /dev/raw/raw4 1,234,567 0.88 0 2,345,678 1.22 0
2 0 /dev/raw/raw5 987,654 0.75 0 1,876,543 1.05 0 2 1 /dev/raw/raw6 876,543 0.78 0 1,765,432 1.08 0 2 2 /dev/raw/raw7 923,456 12.50 5 1,823,456 15.25 8 2 3 /dev/raw/raw8 891,234 0.82 0 1,789,012 1.12 0
3 0 /dev/raw/raw9 567,890 0.65 0 654,321 0.95 0 3 1 /dev/raw/raw10 578,901 0.68 0 665,432 0.98 0