A small script to see what SCSI commands are being issued by a system: http://blogs.sun.com/roller/page/chrisg?entry=scsi_d_script Still work in progress as I needs to handle larger CDBs but it is a start, since I don''t have a disk that big it is not a problem for me yet. Also getting the return scsi packet is a hack but so far I can see no alternative short of knowing about all the possible completion routines or getting Dtrace to write D. --chris This message posted from opensolaris.org
On Fri, 10 Feb 2006, Chris Gerhard wrote:> A small script to see what SCSI commands are being issued by a system:Cool script! Anyway to add this to the DTraceToolkit? Thanks, - Ryan -- UNIX Administrator http://daemons.net/~matty
Chris, I have fixed the problems with getting information from 6Byte, 10Byte, 12Byte, 16Byte, & variable length SCSI CDBs. This version properly calculates LBA & TransferLength for each of the byte length READ/WRITE/SEEK/WRITE AND VERIFY/VERIFY command. More work could still be done to properly display each Opcodes contents.... But again, you run up against DTrace register limits... Cheers, Joel Buckley, x75556 joel.buckley at sun.com ----- Original Message ----- From: Chris Gerhard <Chris.Gerhard at sun.com> Date: Friday, February 10, 2006 9:08 am Subject: [dtrace-discuss] Dtracing scsi To: dtrace-discuss at opensolaris.org> A small script to see what SCSI commands are being issued by a system: > > http://blogs.sun.com/roller/page/chrisg?entry=scsi_d_script > > Still work in progress as I needs to handle larger CDBs but it is a > start, since I don''t have a disk that big it is not a problem for > me yet. > > Also getting the return scsi packet is a hack but so far I can see > no alternative short of knowing about all the possible completion > routines or getting Dtrace to write D. > > --chris > This message posted from opensolaris.org > _______________________________________________ > dtrace-discuss mailing list > dtrace-discuss at opensolaris.org >-------------- next part -------------- A non-text attachment was scrubbed... Name: scsi2.d Type: application/octet-stream Size: 13998 bytes Desc: not available URL: <http://mail.opensolaris.org/pipermail/dtrace-discuss/attachments/20060210/0ccaf847/attachment.obj> -------------- next part -------------- A non-text attachment was scrubbed... Name: Joel.Buckley.vcf Type: text/x-vcard Size: 348 bytes Desc: Card for Joel Buckley <Joel.Buckley at Sun.COM> URL: <http://mail.opensolaris.org/pipermail/dtrace-discuss/attachments/20060210/0ccaf847/attachment.vcf>
G''Day Guys, Nice script! I''d like to see it in the toolkit too. :) Chirs, Joel - if you don''t mind this being in the DTraceToolkit, see how far you can get through the following: 1. run cstyle on it (most of the warnings work for D) and put a similar header to other scripts. 2. test on SPARC & x86 especially important is to create a series of known events, and then test if the script picks them up correctly. I''ve written many scripts that appear to work, but fail this test (even failing 1% of the time is still failing, unless that''s clearly documented!). 3. write a manpage (see the toolkit for examples), especially document if there are tricks to reading the output, or if there are some scenarios where this script doesn''t work. Also document any adverse effect (if any) of running this script in production environments. 4. write an examples file (see Docs/Examples) 5. write a notes file (see Docs/Notes) if there is some really unexpected behaviour that needs explanation. cheers! Brendan [Sydney, Australia] On Fri, 10 Feb 2006, Matty wrote:> On Fri, 10 Feb 2006, Chris Gerhard wrote: > > > A small script to see what SCSI commands are being issued by a system: > > Cool script! Anyway to add this to the DTraceToolkit? > > Thanks, > - Ryan > -- > UNIX Administrator > http://daemons.net/~matty > _______________________________________________ > dtrace-discuss mailing list > dtrace-discuss at opensolaris.org > >
Joel Buckley wrote:> Chris, > > I have fixed the problems with getting information from 6Byte, 10Byte, 12Byte, > 16Byte, & variable length SCSI CDBs.I''m not sure there was a problem with the 6 and 10byte ones, just no support for 12, 16 and variable. Anyway thanks. I''ve done a bit more: Removed all the spaces from the decoded command string so that the output is easier to parse after the fact. Added decoding of READ(32), WRITE(32) and some more of the variable CDB commands. Not been able to test this due to the lack of hardware that supports it. Compacted the output removing the printing of the address of the SCB and reduced the width of the lba to be optimal depending on the group of the command. With mixed group commands this throws formatting but when all the commands are the same group it minimizes the width of the output. -- Chris Gerhard. __o __o __o PTS in Europe _`\<,`\<,`\<,_ Sun Microsystems Limited (*)/---/---/ (*) Phone: +44 (0) 1252 426033 (ext 26033) ----------------------------------------------------------- http://blogs.sun.com/chrisg ----------------------------------------------------------- NOTICE: This email message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: scsi.d URL: <http://mail.opensolaris.org/pipermail/dtrace-discuss/attachments/20060221/7695a1e9/attachment.ksh> -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3253 bytes Desc: S/MIME Cryptographic Signature URL: <http://mail.opensolaris.org/pipermail/dtrace-discuss/attachments/20060221/7695a1e9/attachment.bin>