这段代码是检查底层ASM磁盘组diskgroup的使用情况。
--- check the ASM disk usage
SET lines 1000 PAGES 50000
SELECT group_number,name,type
, round(DECODE(type, 'HIGH', (total_mb/3), 'NORMAL', (total_mb/2), total_mb), 0) total_MB
, round(DECODE(type, 'HIGH', (free_mb/3), 'NORMAL', (free_mb/2), free_mb), 0) free_MB
, USABLE_FILE_MB
, round(DECODE(type, 'HIGH', (total_mb - free_mb)/3, 'NORMAL', (total_mb - free_mb)/2, (total_mb - free_mb)), 0) used_mb
, round((((total_mb - free_mb))/(total_mb)) * 100, 0) Percent_Used
FROM v$asm_diskgroup ORDER BY name;