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
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.
Helps with
More Oracle scripts: RAC & ASM
- Stop, start and check a RAC database (srvctl)Clusterware commands to stop the database, start it read-only, check its status, and start a single instance in MOUNT mode. Run one line at a time;…
- ASM disks and their statusEvery disk ASM can see, including CANDIDATE disks not yet in a group. Check MODE and STATE after storage maintenance.
- ASM rebalance progressRebalance operations in flight with power level and estimated minutes left. No rows means nothing is rebalancing.
- Sessions per instance and serviceHow connections are spread across RAC nodes and services. A lopsided spread usually means a service isn't running where you think it is.
- Global cache (interconnect) waits by instanceCluster-class waits per instance since startup. High average times on gc cr or gc current events point at the interconnect or at hot blocks shared…
- Cluster status commands (srvctl and crsctl)The Clusterware commands for checking a RAC database, its services and every cluster resource.