|
| 1 | +#https://bdrouvot.wordpress.com/db_io_type_metrics_script/ |
| 2 | + |
| 3 | +db_io_type_metrics |
| 4 | +db_io_type_metrics.pl main page |
| 5 | + |
| 6 | +The db_io_type_metrics.pl utility is used to display database physical IO type (small, large, synchronous, reads and writes) real-time metrics. It basically takes a snapshot each second (default interval) from the gv$iostat_file cumulative view and computes the delta with the previous snapshot. The utility is RAC and Multitenant aware. |
| 7 | + |
| 8 | +This utility: |
| 9 | + |
| 10 | +provides useful metrics. |
| 11 | +is RAC aware. |
| 12 | +detects if it is connected to a multitenant database and then is able to display the containers metrics. |
| 13 | +is fully customizable: you can aggregate the results depending on your needs. |
| 14 | +does not install anything into the database. |
| 15 | +It displays the following metrics per IO Type (small, large, synchronous, reads and writes): |
| 16 | + |
| 17 | +MB/s: Megabytes per second. |
| 18 | +RQ/s: Requests per second. |
| 19 | +Avg MB/RQ: Average Megabytes per request. |
| 20 | +Avg ms/RQ: Average ms per request. |
| 21 | +At the following levels: |
| 22 | + |
| 23 | +Database Instance. |
| 24 | +Database container. |
| 25 | +File Type (log file, control file, data file, temp file…) or tablespace. |
| 26 | +Let’s see the help: |
| 27 | + |
| 28 | +./db_io_type_metrics.pl -help |
| 29 | + |
| 30 | +Usage: ./db_io_type_metrics.pl [-interval] [-count] [-inst] [-cont] [-file_type_tbs] [-io_type] [-file_type] [-tbs] [-show] [-display] [-sort_field] [-help] |
| 31 | + |
| 32 | + Default Interval : 1 second. |
| 33 | + Default Count : Unlimited |
| 34 | + |
| 35 | + Parameter Comment Default |
| 36 | + --------- ------- ------- |
| 37 | + -INST= ALL - Show all Instance(s) ALL |
| 38 | + CURRENT - Show Current Instance |
| 39 | + -CONT= Container to collect (wildcard allowed) ALL |
| 40 | + -FILE_TYPE_TBS= Collect on File Type or on Tablespace: file_type,tbs FILE_TYPE |
| 41 | + -IO_TYPE= IO Type to collect: reads,writes,small,large,synch READS |
| 42 | + -FILE_TYPE= File Type to collect (in case FILE_TYPE_TBS=file_type) (wildcard allowed) NONE |
| 43 | + -TBS= Tablespace to collect (in case FILE_TYPE_TBS=tbs) (wildcard allowed) NONE |
| 44 | + -SHOW= What to show: inst,cont,file_type_tbs (comma separated list) INST |
| 45 | + -DISPLAY= What to display: snap,avg (comma separated list) SNAP |
| 46 | + -SORT_FIELD= small_reads,small_writes,large_reads,large_writes NONE |
| 47 | + |
| 48 | +Example: ./db_io_type_metrics.pl |
| 49 | +Example: ./db_io_type_metrics.pl -inst=CBDT1 |
| 50 | +Example: ./db_io_type_metrics.pl -show=inst,file_type_tbs |
| 51 | +Example: ./db_io_type_metrics.pl -show=inst,file_type_tbs -file_type=%Data% |
| 52 | +Example: ./db_io_type_metrics.pl -show=inst -io_type=large |
| 53 | +Example: ./db_io_type_metrics.pl -show=inst -io_type=small -sort_field=small_reads |
| 54 | +Example: ./db_io_type_metrics.pl -show=inst,file_type_tbs -file_type_tbs=tbs -tbs=%USE% |
| 55 | +Example: ./db_io_type_metrics.pl -show=inst,cont |
| 56 | +Example: ./db_io_type_metrics.pl -show=inst,cont -cont=%P% |
| 57 | +Example: ./db_io_type_metrics.pl -show=inst,cont,file_type_tbs -io_type=small -sort_field=small_reads |
| 58 | +The main options/features are: |
| 59 | + |
| 60 | +You can choose the number of snapshots to display and the time to wait between snapshots. |
| 61 | +You can choose on which database instance to collect the metrics thanks to the –INST= parameter. |
| 62 | +You can choose on which database container to collect the metrics thanks to the -CONT= parameter. |
| 63 | +You can choose to collect on File Type or tablespace thanks to the -FILE_TYPE_TBS=parameter. |
| 64 | +You can choose on which IO Type to collect the metrics thanks to the -IO_TYPE= parameter. |
| 65 | +You can choose on which File Type to collect the metric thanks to the -FILE_TYPE=parameter (wilcard allowed). |
| 66 | +You can choose on which Tablespace to collect the metric thanks to the -TBS=parameter (wilcard allowed). |
| 67 | +You can aggregate the results on the database instances, containers, file type or tablespace level thanks to the –SHOW= 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 the –DISPLAY= parameter. |
| 69 | +You can sort based on the number of small_reads, number of small_writes, number of large_reads or number of large_writes thanks to the –SORT_FIELD= parameter. |
0 commit comments