iscsi Provider
The iscsi provider provides probes for tracing iSCSI target activity.
This is a USDT provider built into the iSCSI target daemon (iscsitgtd). As a USDT provider the name is concatenated with the process ID of the daemon (eg. iscis123).
Since this provider instruments the iSCSI target daemon, DTrace commands and scripts must be run on the iSCSI target server to observe these probes.
Probes
| SCSI Event |
Probes |
| SCSI command/response |
iscsi*:::scsi-command
iscsi*:::scsi-response |
| Data out/in/request (rtt) |
iscsi*:::data-send
iscsi*:::data-receive
iscsi*:::data-request |
| Login and logout command/response |
iscsi*:::login-command
iscsi*:::login-response
iscsi*:::logout-command
iscsi*:::logout-response |
| NOP out/in (pings) |
iscsi*:::nop-receive
iscsi*:::nop-send |
| Text and task command/response |
iscsi*:::task-command
iscsi*:::task-response
iscsi*:::text-command
iscsi*:::text-response |
| Asynchronous message from target |
iscsi*:::async-send |
Top
Arguments
| Probes |
Variable |
Type |
Description |
| * |
args[0] |
conninfo_t * |
connection info |
| * |
args[1] |
iscsiinfo_t * |
common iSCSI properties |
| scsi-command |
args[2] |
iscsicmd_t * |
SCSI opcode |
Top
Types
conninfo_t
iscsiinfo_t
iscsicmd_t
Top
Examples
One-liners
Frequency of iSCSI command types:
Frequency of iSCSI client IP addresses:
Payload bytes by iSCSI command type:
Payload byte distribution by iSCSI command type:
iscsiwho.d
This is a simple script to produce a report of the remote IP addresses and a count of iSCSI events. This is intended to provide a quick summary of iSCSI activity when run on the iSCSI target server:
This output shows the host and the number of iSCSI operations:
The fields are:
| field |
description |
| REMOTE IP |
IP address of the client |
| iSCSI EVENT |
iSCSI event type |
| COUNT |
Number of events traced |
The example output shows normal traffic. For this simple script, these event names are not translated beyond their iSCSI provider probe names, and require some thought to comprehend (they are from the perspective of the iSCSI target server).
An interpretation for some of these events are:
| iSCSI event |
Interpretation |
| scsi-command |
A SCSI command was issued, such as a read or a write. Use other scripts for a breakdown on the SCSI command type. |
| data-send |
Data was sent from the iSCSI target server to the client; the client is performing a read. |
| data-receive |
Data was received on the iSCSI target server from the client. The client is performing a write. |