iscsixfer.d
Probes
Although the transport layer is transparent to the user, the COMSTAR iSCSI target also supports iSCSI over RDMA, also known as iSER. An iSER initiator should be able to read and write data from an iSER target at high data rates with relatively low CPU utilization compared to iSCSI using TCP/IP. In order to see the transport layer in use, display the ii_transport
field from the iscsiinfo_t
structure.
Since the data transfer phases are mapped to RDMA operations in iSER, the data-send, data-receive and data-request probes cannot be used with iSER. Instead here is a simple script to print an aggregation of all the data transferred between two points using the xfer-start
probe. This can be used for iSCSI using TCP/IP and iSCSI over Remote DMA.
The data-receive
, data-request
, and data-send
probes can be used when a user wants to track the SCSI Data-IN and Data-OUT PDUs specifically. For example, if the PDUs are received out of order, you might want to trace the ii_ttt
, ii_datasn
, and ii_statsn
. To just get a trace of IO activity, the xfer-start/xfer-done
probes should suffice.
#!/usr/sbin/dtrace -s #pragma D option quiet iscsi:::xfer-start { @[args[0]->ci_remote, args[2]->xfer_type] = sum(args[2]->xfer_len); } END { printf("%26s %10s %8s\n", "REMOTE IP", "READ/WRITE", "BYTES"); printa("%26s %10s %15@d\n", @); }
This output shows the transfer of bytes:
# ./iscsixfer.d Tracing... Hit Ctrl-C to end. ^C REMOTE IP READ/WRITE BYTES 192.0.2.14 write 464 192.0.2.14 read 1024
The output fields are described in the following table.
Field | Description |
---|---|
|
IP address of the client |
|
Read or write |
|
Number of bytes transferred |
You can use the following script to see the data read or write as it happens.
#!/usr/sbin/dtrace -s #pragma D option quiet BEGIN { printf(" %-26s %8s %10s\n", "REMOTE IP", "BYTES", "READ/WRITE"); } iscsi:::xfer-start { printf("%26s %%8d %108s\n", args[0]->ci_remote, args[2]->xfer_len, args[2]->xfer_type); }
The following table provides the interpretation for some of these events.
iSCSI event | Interpretation |
---|---|
|
A SCSI command was issued, such as a read or a write. Use other scripts for a breakdown on the SCSI command type. |
|
Data was sent from the iSCSI target server to the client; the client is performing a read. |
|
Data was received on the iSCSI target server from the client. The client is performing a write. |