denrepo

OracleRAC & ASM

ASM disk group space

Size, free and usable space per disk group. Usable GB already accounts for mirroring, so it's the number to alert on. Works from the ASM or database instance.

Not yet verified. How scripts are tested

ora-asm-dg.sql
1CLEAR COLUMNS2SET LINESIZE 140 PAGESIZE 100 TRIMOUT ON TAB OFF3COLUMN name          HEADING "DISK GROUP" FORMAT A154COLUMN state         FORMAT A105COLUMN type          HEADING "REDUNDANCY" FORMAT A106COLUMN total_gb      HEADING "TOTAL GB"   FORMAT 9,999,9907COLUMN free_gb       HEADING "FREE GB"    FORMAT 9,999,9908COLUMN usable_gb     HEADING "USABLE GB"  FORMAT 9,999,9909COLUMN used_pct      HEADING "USED %"     FORMAT 990.910COLUMN offline_disks HEADING "OFFLINE"    FORMAT 99011 12SELECT name, state, type,13       ROUND(total_mb / 1024) AS total_gb,14       ROUND(free_mb / 1024) AS free_gb,15       ROUND(usable_file_mb / 1024) AS usable_gb,16       ROUND(100 * (1 - free_mb / NULLIF(total_mb, 0)), 1) AS used_pct,17       offline_disks18FROM v$asm_diskgroup19ORDER BY name;

Save it as ora-asm-dg.sql and run it with SQL> @ora-asm-dg.

Open in denrepo

Helps with

More Oracle scripts: RAC & ASM