Skip to content

Filtering what scsi.d processes scsi.d reports IO for.

July 18, 2008

I have updated scsi.d to allow you to see just the the commands associated with particular processes either by execname or by process id.

To see all the scsi IO associated with a process with an exec name of “dd”:

# /tmp/scsi.d -D EXECNAME=’"dd"’                              Hit Control C to interrupt 00058.416893400 glm0:-> 0x00 TEST_UNIT_READY address 00:00, lba 0x000000, len 0x000000, control 0x00 timeout 60 CDBP 300e8f41358 1 dd(23319) cdb(6) 000000000000 00058.417960685 glm0:<- 0x00 TEST_UNIT_READY address 00:00, lba 0x000000, len 0x000000, control 0x00 timeout 60 CDBP 300e8f41358, reason 0x0 (COMPLETED) state 0x17 Time 1208us 00058.418159142 glm0:-> 0x00 TEST_UNIT_READY address 00:00, lba 0x000000, len 0x000000, control 0x00 timeout 60 CDBP 300e8f41358 1 dd(23319) cdb(6) 000000000000 00058.419187590 glm0:<- 0x00 TEST_UNIT_READY address 00:00, lba 0x000000, len 0x000000, control 0x00 timeout 60 CDBP 300e8f41358, reason 0x0 (COMPLETED) state 0x17 Time 1128us 00058.419399600 glm0:-> 0x1a MODE_SENSE(6) address 00:00, lba 0x000300, len 0x000024, control 0x00 timeout 60 CDBP 300e8f41358 1 dd(23319) cdb(6) 1a0003002400 00058.443792908 glm0:<- 0x1a MODE_SENSE(6) address 00:00, lba 0x000300, len 0x000024, control 0x00 timeout 60 CDBP 300e8f41358, reason 0x0 (COMPLETED) state 0x1f Time 24492us 00058.443986521 glm0:-> 0x1a MODE_SENSE(6) address 00:00, lba 0x000400, len 0x000024, control 0x00 timeout 60 CDBP 300e8f41358 1 dd(23319) cdb(6) 1a0004002400 00058.460271773 glm0:<- 0x1a MODE_SENSE(6) address 00:00, lba 0x000400, len 0x000024, control 0x00 timeout 60 CDBP 300e8f41358, reason 0x0 (COMPLETED) state 0x1f Time 16385us 00058.460509036 glm0:-> 0x08   READ(6) address 00:00, lba 0x000000, len 0x000001, control 0x00 timeout 60 CDBP 300e8f41358 1 dd(23319) cdb(6) 080000000100 00058.464377145 glm0:<- 0x08   READ(6) address 00:00, lba 0x000000, len 0x000001, control 0x00 timeout 60 CDBP 300e8f41358, reason 0x0 (COMPLETED) state 0x1f Time 3966us 00058.464571604 glm0:-> 0x08   READ(6) address 00:00, lba 0x000000, len 0x000001, control 0x00 timeout 60 CDBP 300e8f41358 1 dd(23319) cdb(6) 080000000100 00058.465001748 glm0:<- 0x08   READ(6) address 00:00, lba 0x000000, len 0x000001, control 0x00 timeout 60 CDBP 300e8f41358, reason 0x0 (COMPLETED) state 0x1f Time 528us 00058.465739416 glm0:-> 0x08   READ(6) address 00:00, lba 0x0186a0, len 0x000001, control 0x00 timeout 60 CDBP 300e8f41358 1 dd(23319) cdb(6) 080186a00100 00058.471783255 glm0:<- 0x08   READ(6) address 00:00, lba 0x0186a0, len 0x000001, control 0x00 timeout 60 CDBP 300e8f41358, reason 0x0 (COMPLETED) state 0x1f Time 6143us 


or to see all the scsi IO associated with a particular command:

# ./scsi.d -c "dd  if=/dev/rdsk/c0t0d0s0 of=/dev/null count=1 iseek=100000" Hit Control C to interrupt 1+0 records in 1+0 records out 00000.046670200 glm0:-> 0x00 TEST_UNIT_READY address 00:00, lba 0x000000, len 0x000000, control 0x00 timeout 60 CDBP 300e8f41358 1 dd(23326) cdb(6) 000000000000 00000.047677067 glm0:<- 0x00 TEST_UNIT_READY address 00:00, lba 0x000000, len 0x000000, control 0x00 timeout 60 CDBP 300e8f41358, reason 0x0 (COMPLETED) state 0x17 Time 1151us 00000.047871553 glm0:-> 0x00 TEST_UNIT_READY address 00:00, lba 0x000000, len 0x000000, control 0x00 timeout 60 CDBP 300e8f41358 1 dd(23326) cdb(6) 000000000000 00000.048759564 glm0:<- 0x00 TEST_UNIT_READY address 00:00, lba 0x000000, len 0x000000, control 0x00 timeout 60 CDBP 300e8f41358, reason 0x0 (COMPLETED) state 0x17 Time 988us 00000.048979511 glm0:-> 0x1a MODE_SENSE(6) address 00:00, lba 0x000300, len 0x000024, control 0x00 timeout 60 CDBP 300e8f41358 1 dd(23326) cdb(6) 1a0003002400 00000.073204217 glm0:<- 0x1a MODE_SENSE(6) address 00:00, lba 0x000300, len 0x000024, control 0x00 timeout 60 CDBP 300e8f41358, reason 0x0 (COMPLETED) state 0x1f Time 24326us 00000.073406796 glm0:-> 0x1a MODE_SENSE(6) address 00:00, lba 0x000400, len 0x000024, control 0x00 timeout 60 CDBP 300e8f41358 1 dd(23326) cdb(6) 1a0004002400 00000.089689153 glm0:<- 0x1a MODE_SENSE(6) address 00:00, lba 0x000400, len 0x000024, control 0x00 timeout 60 CDBP 300e8f41358, reason 0x0 (COMPLETED) state 0x1f Time 16385us 00000.089932178 glm0:-> 0x08   READ(6) address 00:00, lba 0x000000, len 0x000001, control 0x00 timeout 60 CDBP 300e8f41358 1 dd(23326) cdb(6) 080000000100 00000.093793880 glm0:<- 0x08   READ(6) address 00:00, lba 0x000000, len 0x000001, control 0x00 timeout 60 CDBP 300e8f41358, reason 0x0 (COMPLETED) state 0x1f Time 3962us 00000.093991464 glm0:-> 0x08   READ(6) address 00:00, lba 0x000000, len 0x000001, control 0x00 timeout 60 CDBP 300e8f41358 1 dd(23326) cdb(6) 080000000100 00000.094429110 glm0:<- 0x08   READ(6) address 00:00, lba 0x000000, len 0x000001, control 0x00 timeout 60 CDBP 300e8f41358, reason 0x0 (COMPLETED) state 0x1f Time 538us 00000.095207716 glm0:-> 0x08   READ(6) address 00:00, lba 0x0186a0, len 0x000001, control 0x00 timeout 60 CDBP 300e8f41358 1 dd(23326) cdb(6) 080186a00100 00000.101200857 glm0:<- 0x08   READ(6) address 00:00, lba 0x0186a0, len 0x000001, control 0x00 timeout 60 CDBP 300e8f41358, reason 0x0 (COMPLETED) state 0x1f Time 6096us 

Similarly you can see the IO associated with a particular process:

# ./scsi.d -p $(pgrep -x dd) | head -30 | sort -n Hit Control C to interrupt 00000.002472402 glm0:-> 0x08   READ(6) address 00:00, lba 0x02b2d2, len 0x000001, control 0x00 timeout 60 CDBP 300e8f40318 1 dd(23328) cdb(6) 0802b2d20100 00000.010438300 glm0:<- 0x08   READ(6) address 00:00, lba 0x02b2d2, len 0x000001, control 0x00 timeout 60 CDBP 300e8f40318, reason 0x0 (COMPLETED) state 0x1f Time 8156us 00000.010706063 glm0:-> 0x08   READ(6) address 00:00, lba 0x02b2d3, len 0x000001, control 0x00 timeout 60 CDBP 300e8f40318 1 dd(23328) cdb(6) 0802b2d30100 00000.011154931 glm0:<- 0x08   READ(6) address 00:00, lba 0x02b2d3, len 0x000001, control 0x00 timeout 60 CDBP 300e8f40318, reason 0x0 (COMPLETED) state 0x1f Time 560us 00000.011371674 glm0:-> 0x08   READ(6) address 00:00, lba 0x02b2d4, len 0x000001, control 0x00 timeout 60 CDBP 300e8f40318 1 dd(23328) cdb(6) 0802b2d40100 00000.011814640 glm0:<- 0x08   READ(6) address 00:00, lba 0x02b2d4, len 0x000001, control 0x00 timeout 60 CDBP 300e8f40318, reason 0x0 (COMPLETED) state 0x1f Time 552us 00000.012025254 glm0:-> 0x08   READ(6) address 00:00, lba 0x02b2d5, len 0x000001, control 0x00 timeout 60 CDBP 300e8f40318 1 dd(23328) cdb(6) 0802b2d50100 00000.012468655 glm0:<- 0x08   READ(6) address 00:00, lba 0x02b2d5, len 0x000001, control 0x00 timeout 60 CDBP 300e8f40318, reason 0x0 (COMPLETED) state 0x1f Time 552us 

Clearly there are plenty of possiblities here, not least the reporting of all IO associated with a process or command and all of it’s children.

This is still work in progress but since I’ve used it to file a bug I thought I better put it out here so that others can enjoy it. This is version 1.14.

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: