Skip to content

Commit f0e1dde

Browse files
authored
Create asm-metrics.pl
1 parent 71af674 commit f0e1dde

File tree

1 file changed

+69
-0
lines changed

1 file changed

+69
-0
lines changed

asm-metrics.pl

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
https://bdrouvot.wordpress.com/asm_metrics_script/
2+
3+
asm_metrics.pl main page
4+
5+
The asm_metrics.pl utility is used to display ASM real-time metrics. It basically takes a snapshot each second (default interval) from the gv$asm_disk_iostat (or gv$asm_disk_stat depending of the version) cumulative view and computes the delta with the previous snapshot.
6+
7+
This utility:
8+
9+
provides useful metrics.
10+
is RAC aware.
11+
is fully customizable: you can aggregate the results depending on your needs.
12+
does not install anything into the database or ASM instance.
13+
It displays the following metrics:
14+
15+
Reads/s: Number of read per second.
16+
KbyRead/s: Kbytes read per second.
17+
Avg ms/Read: ms per read in average.
18+
AvgBy/Read: Average Bytes per read.
19+
Same metrics are provided for Write Operations.
20+
At the following levels:
21+
22+
ASM Instance.
23+
Database Instance.
24+
ASM Diskgroup.
25+
ASM Failgroup (Or cells IP on Exadata).
26+
Disks.
27+
Lets see the help:
28+
29+
./asm_metrics.pl -help
30+
31+
Usage: ./asm_metrics.pl [-interval] [-count] [-inst] [-dbinst] [-dg] [-fg] [-ip] [-show] [-display] [-sort_field] [-help]
32+
33+
Default Interval : 1 second.
34+
Default Count : Unlimited
35+
36+
Parameter Comment Default
37+
--------- ------- -------
38+
-INST= ALL - Show all Instance(s) ALL
39+
CURRENT - Show Current Instance
40+
INSTANCE_NAME,... - choose Instance(s) to display
41+
42+
-DBINST= Database Instance to collect (Wildcard allowed) ALL
43+
-DG= Diskgroup to collect (Wildcard allowed) ALL
44+
-FG= Failgroup to collect (Wildcard allowed) ALL
45+
-IP= IP (Exadata Cells) to collect (Wildcard allowed) ALL
46+
-SHOW= What to show: inst,dbinst,fg|ip,dg,dsk (comma separated list) DG
47+
-DISPLAY= What to display: snap,avg (comma separated list) SNAP
48+
-SORT_FIELD= reads|writes|iops NONE
49+
50+
Example: ./asm_metrics.pl
51+
Example: ./asm_metrics.pl -inst=+ASM1
52+
Example: ./asm_metrics.pl -dg=DATA -show=dg
53+
Example: ./asm_metrics.pl -dg=data -show=inst,dg,fg
54+
Example: ./asm_metrics.pl -show=dg,dsk
55+
Example: ./asm_metrics.pl -show=inst,dg,fg,dsk
56+
Example: ./asm_metrics.pl -interval=5 -count=3 -sort_field=iops
57+
Example: ./asm_metrics.pl -show=dg -display=avg -sort_field=iops
58+
Example: ./asm_metrics.pl -show=dg -display=snap,avg -sort_field=iops
59+
The main options/features are:
60+
61+
You can choose the number of snapshots to display and the time to wait between snapshots.
62+
You can choose on which ASM instance to collect the metrics thanks to theINST= parameter.
63+
You can choose for which DB instance to collect the metrics thanks to theDBINST= parameter (wildcard allowed).
64+
You can choose on which Diskgroup to collect the metrics thanks to theDG= parameter (wildcard allowed).
65+
You can choose on which Failgroup to collect the metrics thanks to theFG= parameter (wildcard allowed).
66+
You can choose on which Exadata Cells to collect the metrics thanks to theIP= parameter (wildcard allowed).
67+
You can aggregate the results on the ASM instances, DB instances, Diskgroup, Failgroup (or Exadata cells IP) level thanks to theSHOW= parameter.
68+
You can display the metrics per snapshot, the average metrics value since the collection began (that is to say since the script has been launched) or both thanks to theDISPLAY= parameter.
69+
You can sort based on the number of reads, number of writes or number of IOPS (reads+writes) thanks to theSORT_FIELD= parameter (See example here)

0 commit comments

Comments
 (0)