Into this post I introduced my exadata_metrics.pl script that I use to collect real-time cell’s metrics from the cumulative ones.

I added new features on it that you may find useful/helpful:

  1. First  I added the possibility to aggregate the results based on the cell, on the metricobjectname or both: That is to say you can customize the way the metrics are computed.
  2. Secondly I added the possibility to use a “groupfile” (a file containing a list of cells: same format as the dcli utility) as input (could be useful if your exadata has a lot of cells ;-) )

Lets see examples to make it clear: For this I will focus on the CD_IO_TM_R_SM metric and on 2 cells only (for output simplicity) during the last 100 seconds.

To collect the metrics without aggregation:

./exadata_metrics.pl 100 groupfile=./cell_group name='CD_IO_TM_R_SM'

The output will be like:

07:59:46   CELL                    NAME                         OBJECTNAME                                                  VALUE
07:59:46   ----                    ----                         ----------                                                  -----
07:59:46   cell2                   CD_IO_TM_R_SM                CD_disk05_cell                                              0.00 us
07:59:46   cell2                   CD_IO_TM_R_SM                FD_03_cell                                                  0.00 us
07:59:46   cell2                   CD_IO_TM_R_SM                CD_disk03_cell                                              36479.00 us
07:59:46   cell                    CD_IO_TM_R_SM                CD_disk06_cell                                              41572.00 us
07:59:46   cell2                   CD_IO_TM_R_SM                CD_disk02_cell                                              167822.00 us
07:59:46   cell                    CD_IO_TM_R_SM                CD_disk02_cell                                              522659.00 us
07:59:46   cell                    CD_IO_TM_R_SM                CD_disk04_cell                                              523456.00 us
07:59:46   cell                    CD_IO_TM_R_SM                CD_disk01_cell                                              553921.00 us
07:59:46   cell                    CD_IO_TM_R_SM                FD_02_cell                                                  580027.00 us
07:59:46   cell                    CD_IO_TM_R_SM                FD_03_cell                                                  801521.00 us
07:59:46   cell                    CD_IO_TM_R_SM                FD_01_cell                                                  845028.00 us
07:59:46   cell                    CD_IO_TM_R_SM                FD_00_cell                                                  1228914.00 us
07:59:46   cell2                   CD_IO_TM_R_SM                CD_disk01_cell                                              1229929.00 us
07:59:46   cell                    CD_IO_TM_R_SM                CD_disk05_cell                                              1314321.00 us
07:59:46   cell                    CD_IO_TM_R_SM                CD_disk03_cell                                              4055302.00 us

With an aggregation on the objectname (I use the “show” option has I want to display cell and name):

./exadata_metrics.pl 100 groupfile=./cell_group name='CD_IO_TM_R_SM' show=cell,name

The output would have been like:

07:59:48   CELL                    NAME                         OBJECTNAME                                                  VALUE
07:59:48   ----                    ----                         ----------                                                  -----
07:59:48   cell2                   CD_IO_TM_R_SM                                                                            1434230.00 us
07:59:48   cell                    CD_IO_TM_R_SM                                                                            10466721.00 us

As you can see, the objectname has disappeared as the metrics have been aggregated on it.

Let’s collect one more time with no aggregation:

./exadata_metrics.pl 100 groupfile=./cell_group name='CD_IO_TM_R_SM'

With no aggregation the output will be like:

09:37:01   CELL                    NAME                         OBJECTNAME                                                  VALUE
09:37:01   ----                    ----                         ----------                                                  -----
09:37:01   cell2                   CD_IO_TM_R_SM                CD_disk09_cell                                              0.00 us
09:37:01   cell2                   CD_IO_TM_R_SM                CD_disk05_cell                                              0.00 us
09:37:01   cell2                   CD_IO_TM_R_SM                FD_03_cell                                                  0.00 us
09:37:01   cell                    CD_IO_TM_R_SM                CD_disk12_cell                                              0.00 us
09:37:01   cell                    CD_IO_TM_R_SM                CD_disk01_cell                                              879.00 us
09:37:01   cell                    CD_IO_TM_R_SM                CD_disk06_cell                                              41629.00 us
09:37:01   cell                    CD_IO_TM_R_SM                FD_03_cell                                                  111676.00 us
09:37:01   cell                    CD_IO_TM_R_SM                FD_02_cell                                                  233388.00 us
09:37:01   cell                    CD_IO_TM_R_SM                FD_01_cell                                                  253784.00 us
09:37:01   cell                    CD_IO_TM_R_SM                CD_disk04_cell                                              519624.00 us
09:37:01   cell                    CD_IO_TM_R_SM                CD_disk05_cell                                              587848.00 us
09:37:01   cell2                   CD_IO_TM_R_SM                CD_disk03_cell                                              1949331.00 us
09:37:01   cell2                   CD_IO_TM_R_SM                CD_disk02_cell                                              2016198.00 us
09:37:01   cell                    CD_IO_TM_R_SM                CD_disk03_cell                                              3220328.00 us
09:37:01   cell2                   CD_IO_TM_R_SM                CD_disk01_cell                                              3631941.00 us

With an aggregation on the cell and the objectname (I use the “show” option has I want to display name)**:

./exadata_metrics.pl 100 groupfile=./cell_group name='CD_IO_TM_R_SM' show=name

The output would have been like:

09:36:59   CELL                    NAME                         OBJECTNAME                                                  VALUE
09:36:59   ----                    ----                         ----------                                                  -----
09:36:59                           CD_IO_TM_R_SM                                                                            12566626.00 us

As you can see, the objectname and the cell have disappeared as the metrics have been aggregated.

Let’s see the help:

 ./exadata_metrics.pl help

Usage: ./exadata_metrics.pl [Interval [Count]] [cell=|groupfile=] [show=] [top=] [name=] [name!=] [objectname=] [objectname!=]

 Default Interval : 1 second.
 Default Count : Unlimited

 Parameter                 Comment                                                      Default
 ---------                 -------                                                      -------
 CELL=                     comma-separated list of cells
 GROUPFILE=                file containing list of cells
 SHOW=                     What to show (name included): cell,objectname                ALL
 TOP=                      Number of rows to display                                    10
 NAME=                     ALL - Show all cumulative metrics (wildcard allowed)         ALL
 NAME!=                    Exclude cumulative metrics (wildcard allowed)                EMPTY
 OBJECTNAME=               ALL - Show all objects (wildcard allowed)                    ALL
 OBJECTNAME!=              Exclude objects (wildcard allowed)                           EMPTY

utility assumes passwordless SSH from this cell node to the other cell nodes
utility assumes ORACLE_HOME has been set (with celladmin user for example)

Example : ./exadata_metrics.pl cell=cell
Example : ./exadata_metrics.pl groupfile=./cell_group
Example : ./exadata_metrics.pl groupfile=./cell_group show=name
Example : ./exadata_metrics.pl cell=cell objectname='CD_disk03_cell' name!='.*RQ_W.*'
Example : ./exadata_metrics.pl cell=cell name='.*BY.*' objectname='.*disk.*' name!='GD.*' objectname!='.*disk1.*'

Conclusion:

  • You are able to collect real-time metrics based on cumulative metrics.
  • You can choose the number of snapshots to display and the time to wait between snapshots.
  • You can choose to filter on name and objectname based on predicates (see the help).
  • You can work on all the cells or a subset thanks to the CELL or the GROUPFILE parameter.
  • You can decide the way to compute the metrics with no aggregation, aggregation on cell, objectname or both.

To get the exadata_metrics.pl script:  Click on the link, and then on the view source button and then copy/paste the source code. You can also download the script from this repository to avoid copy/paste (click on the link).

Any remarks, suggestions, questions are welcome.

Update:

You should read this post for a better interpretation of the utility: Exadata Cell metrics: collectionTime attribute, something that matters