set pagesize 3500;
set linesize 3500;
column group_number format 999 heading group_number;
column name_group format a20 heading name_group;
column name_disk format a22 heading name_disk;
column state format a10 heading state;
column mount_status format a15 heading mount_status;
column mode_status format a15 heading mode_status;
column path format a30 heading path;
column num format 999 heading num;
column tgb format 9999.99 heading Total_GB;
column dgb format 9999.99 heading Total_GB;
column ogb format 9999.99 heading Ocuppied_total_GB;
column fgb format 9999.99 heading Free_total_GB;
column DATABASE_COMPATIBILITY format a16 heading DB_COMPATIBILITY;
column COMPATIBILITY format a15 heading COMPATIBILITY;
column AU_MB format 9999 heading AU_MB;
column %Free format 9999;

select vg.type,vg.group_number, vg.state state, vg.name name_group, vg.allocation_unit_size/1024/1024 AU_MB, 
vg.total_mb/1024 tgb, (vg.total_mb/1024) - (vg.free_mb/1024) ogb, vg.free_mb/1024 fgb, 
decode(vg.total_mb, 0, 0, to_char(vg.free_mb*100/vg.total_mb, '999G999')) "%Free", 
vg.DATABASE_COMPATIBILITY, vg.COMPATIBILITY
from v$asm_diskgroup_stat vg 
order by vg.name;

