ASM Script to check .... ASM diskgroup size, ASM disk size , CANDIDATE Disk path..
ASM disk size
SET ECHO OFF FEEDBACK 6 HEADING ON LINESIZE 200 PAGESIZE 1000 TERMOUT ON TIMING OFF TRIMOUT ON TRIMSPOOL ON VERIFY OFF
CLEAR COLUMNS
CLEAR BREAKS
CLEAR COMPUTES
COLUMN disk_group_name FORMAT a12 HEAD 'Disk Group Name'
COLUMN disk_file_path FORMAT a45 HEAD 'Path'
COLUMN disk_file_name FORMAT a12 HEAD 'File Name'
COLUMN disk_file_fail_group FORMAT a12 HEAD 'Fail Group'
COLUMN total_mb FORMAT 999,999,999 HEAD 'File Size (MB)'
COLUMN used_mb FORMAT 999,999,999 HEAD 'Used Size (MB)'
COLUMN pct_used FORMAT 999.99 HEAD 'Pct. Used'
BREAK ON report ON disk_group_name SKIP 1
COMPUTE sum LABEL "" OF total_mb used_mb ON disk_group_name
COMPUTE sum LABEL "Grand Total: " OF total_mb used_mb ON report
SELECT
NVL(a.name, '[CANDIDATE]') disk_group_name
, b.path disk_file_path
, b.name disk_file_name
, b.failgroup disk_file_fail_group
, b.total_mb total_mb
, (b.total_mb - b.free_mb) used_mb
, ROUND((1- (b.free_mb / b.total_mb))*100, 2) pct_used
FROM v$asm_diskgroup a ,v$asm_disk b
where a.group_number (+) =b.group_number
ORDER BY a.name;
Disk Group N Path File Name Fail Group File Size (MB) Used Size (MB) Pct. Used
------------ --------------------------------------------- ------------ ------------ -------------- -------------- ---------
DATA /dev/vx/rdsk/oraasmdatatrn/oraasmdatatrn_v3 DATA_0002 DATA_0002 30,686 28,359 92.42
/dev/vx/rdsk/oraasmdatatrn/oraasmdatatrn_v1 DATA_0000 DATA_0000 30,686 28,367 92.44
/dev/vx/rdsk/oraasmdatatrn/oraasmdatatrn_v2 DATA_0001 DATA_0001 30,686 28,354 92.40
************ -------------- --------------
92,058 85,080
FLASH /dev/vx/rdsk/oraasmflashtrn/oraasmflashtrn_v3 FLASH_0002 FLASH_0002 30,686 3,797 12.37
/dev/vx/rdsk/oraasmflashtrn/oraasmflashtrn_v1 FLASH_0000 FLASH_0000 30,686 3,803 12.39
/dev/vx/rdsk/oraasmflashtrn/oraasmflashtrn_v2 FLASH_0001 FLASH_0001 30,686 3,798 12.38
************ -------------- --------------
92,058 11,398
REDO1 /dev/vx/rdsk/oraasmredo1trn/oraasmredo1trn_v1 REDO1_0000 REDO1_0000 3,039 238 7.83
/dev/vx/rdsk/oraasmredo1trn/oraasmredo1trn_v2 REDO1_0001 REDO1_0001 3,039 230 7.57
/dev/vx/rdsk/oraasmredo1trn/oraasmredo1trn_v3 REDO1_0002 REDO1_0002 3,039 230 7.57
************ -------------- --------------
9,117 698
REDO2 /dev/vx/rdsk/oraasmredo2trn/oraasmredo2trn_v3 REDO2_0002 REDO2_0002 3,039 230 7.57
/dev/vx/rdsk/oraasmredo2trn/oraasmredo2trn_v2 REDO2_0001 REDO2_0001 3,039 228 7.50
/dev/vx/rdsk/oraasmredo2trn/oraasmredo2trn_v1 REDO2_0000 REDO2_0000 3,039 240 7.90
************ -------------- --------------
9,117 698
[CANDIDATE] /dev/vx/rdsk/oraasmdatatrn/oraasmdatatrn_v4 30,686 30,686 100.00
************ -------------- --------------
30,686 30,686
-------------- --------------
Grand Total: 233,036 128,560
13 rows selected.
********** -------------- --------------
30,686 30,686
-------------- --------------
Grand Tota 233,036 128,560
13 rows selected.
No comments:
Post a Comment