Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

Last night the recovery area on one of our Oracle Database Appliances went full. This was reported in one of the database alert logs, and we were able to clear out some space before the next log switch, at which point the production would have come to a halt.

It certainly would have been nice to have a little more warning, like when the disk group was 70% full.

What options do we have for monitoring disk usage inside ASM?

share|improve this question

1 Answer 1

up vote 3 down vote accepted

Just use asmcmd. For example:

[oracle@oel61 ~]$ . oraenv
ORACLE_SID = [+ASM] ? +ASM
The Oracle base remains unchanged with value /u01/app/oracle
[oracle@oel61 ~]$ asmcmd lsdg
State    Type    Rebal  Sector  Block       AU  Total_MB  Free_MB  Req_mir_free_MB  Usable_file_MB  Offline_disks  Voting_files  Name
MOUNTED  EXTERN  N         512   4096  1048576     30708    28479                0           28479              0             N  DATA/
[oracle@oel61 ~]$ 

Or get the info directly from the ASM Oracle instance:

[oracle@oel61 ~]$ . oraenv
ORACLE_SID = [+ASM] ? +ASM
The Oracle base remains unchanged with value /u01/app/oracle
[oracle@oel61 ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.2.0 Production on Thu Mar 7 10:44:44 2013

Copyright (c) 1982, 2010, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Automatic Storage Management option

SQL> SELECT name, free_mb, total_mb, free_mb/total_mb*100 as percentage 
     FROM v$asm_diskgroup;

NAME                  FREE_MB   TOTAL_MB PERCENTAGE
------------------------------ ---------- ---------- ----------
DATA                    28479      30708 92.7413052

SQL> 
share|improve this answer
1  
OEM also has the info when you have that, and can probably be coerced into raising alerts. The v$asm_diskgroup view is also available on the "client" database(s) (might depend on exact versions), which is pretty practical if you already have custom monitoring scripts in there. –  Mat Mar 7 '13 at 11:13
    
The v$asm_diskgroup view is very convenient. Thanks! Although, the TOTAL_MB and FREE_MB columns appear to show raw capacity as opposed to usable space, is that right? –  Roy Mar 7 '13 at 11:30
    
See Managing Capacity in Disk Groups for the details on that view, @Roy. –  Mat Mar 7 '13 at 11:58
    
Right you are, thanks @Mat –  Roy Mar 7 '13 at 12:02

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.