Skip to content

Gathering performance statistics with scsi.d

October 10, 2008

While scsi.d is good for looking at scsi packets and seeing those raw CDBs not many people are really interested in what a SCSI packet looks like, well not enough people if you ask me. However what is much more interesting is how long the scsi packets are taking. Now scsi.d tells you this for each packet but aggregating the data would be are more useful.

: e2big.eu TS 81 $; pfexec /usr/sbin/dtrace -Cs scsi.d -D QUIET -D PERF_REPORT -D REPORT_TARGET \ -D REPORT_LUN -n tick-1m {printa(@); clear(@); exit(0) } Hit Control C to interrupt    qus                                                       1            value  ————- Distribution ————- count               131072 |                                         0                   262144 |@@@@                                     25                  524288 |@@@@@@@@@@@@                             68                 1048576 |@@@@@@                                   34                 2097152 |                                         2                  4194304 |@@@                                      19                 8388608 |@@@@@                                    29                16777216 |@@@@                                     22                33554432 |@@@@@@                                   35                67108864 |                                         1                134217728 |                                         0            fp                                                        2            value  ————- Distribution ————- count               262144 |                                         0                   524288 |                                         3                  1048576 |                                         1                  2097152 |@@                                       15                 4194304 |@@@@@@@@                                 67                 8388608 |@@@@@@@@@@                               81                16777216 |@@@@@@@@                                 65                33554432 |@@@@@@@@                                 66                67108864 |@@@                                      27               134217728 |                                         0            fp                                                        0            value  ————- Distribution ————- count                65536 |                                         0                   131072 |                                         27                  262144 |@                                        485                 524288 |@@@@@@                                   2901               1048576 |@@@@@                                    2203               2097152 |@@@@@@@                                  3204               4194304 |@@@@@@@@@                                4087               8388608 |@@@@@@@@                                 3978              16777216 |@@@                                      1606              33554432 |@                                        570               67108864 |                                         123              134217728 |                                         45               268435456 |                                         0            fp                                                        3            value  ————- Distribution ————- count                65536 |                                         0                   131072 |                                         41                  262144 |@                                        493                 524288 |@@@@@@                                   2926               1048576 |@@@@                                     2157               2097152 |@@@@@@                                   3228               4194304 |@@@@@@@@@                                4461               8388608 |@@@@@@@@@                                4561              16777216 |@@@                                      1634              33554432 |@                                        510               67108864 |                                         116              134217728 |                                         52               268435456 |                                         2                536870912 |                                         0            scsi_vhci                                                 0            value  ————- Distribution ————- count               131072 |                                         0                   262144 |@                                        588                 524288 |@@@@@                                    4807               1048576 |@@@@@@                                   5423               2097152 |@@@@@@@                                  6609               4194304 |@@@@@@@@@                                8627               8388608 |@@@@@@@@@                                8641              16777216 |@@@                                      3289              33554432 |@                                        1088              67108864 |                                         239              134217728 |                                         97               268435456 |                                         2                536870912 |                                         0           : e2big.eu TS 82 $; 

All the new options are supplied via -D flags to dtrace and they are:

Option Name

Description

QUIET

Be quiet. Don’t report any packets seen. Useful when you only want a performance report.

PERF_REPORT

Produce a per HBA performance report when the script complete. The report is an aggregation held in @ so can be printed at regular intervals using a tick probe as in the above example but without the call to exit().

REPORT_TARGET

If producing a peformance report include the target to produce per target report.

REPORT_LUN

If producing a per target report then include the LUN to produce a per lun report.

DYNVARSIZE

Pass this value to the #pragma D option dynvarsize= option. Eg:

-D DYNVARSIZE=64m


The latest version of the script, version 1.15 is here: <A HREF="https://chrisgerhard.files.wordpress.com/2010/01/scsi_d/scsi.d-1.15

Advertisements

From → Solaris

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: