IN THIS EDITION
Introduction One extremely powerful feature of the STB Suite Disk Manufacturing Module (DMM) is the “External Program” test step. This step test makes DMM a completely extendable test platform – any test function that you need that isn’t already built in can be added quickly and easily. In this article we will use the example of adding a test to DMM which will measure the Track-to-track, Third-Stroke, and Full-Stroke SEEK times of SCSI/FC, or SAS drives, and will record these three SEEK times back to the DMM individual drive log files. Implementing the test We will write this test using the STB Suite Developers Toolbox (DTB) api. We will write this example using Visual Studio 6, C++. It could just as easily be written using VB or .Net. The ANSI T10 committee has retired or obsoleted the SEEK command and so we will need to find another way to accomplish our goal. If you were only testing drives which you know have the old SEEK command implemented it would be a simpler program to use that CDB. In our case we will use single-block READ(10) commands, using the Force Unit Access (FUA) bit to insure actual media access instead of everything being done out of cache. To calculate a baseline we will initially execute 1,000 single-block READ(10) commands w/o FUA, all from block 0 – to calculate the time taken in transferring data. Later we will subtract this overhead time from our SEEK times to obtain a more accurate measurement. Once we have this baseline we will then execute 1,000 single-block READ(10) w/ FUA set – alternating between block 0 and a block number estimated to be around one track away from zero. Then, 1,000 of the same, between block zero and an LBA one-third of the way into the drive, then 1,000 of the same between block zero and the high block number of the drive. We experimented with trying to read the drive geometry MODE PAGE and actually calculate what is one track, one-third of the drive, and the end of the drive – all of that effort did not make any practical difference in the test results. For the obsessive among our readers feel free to implement this - you could even go so far as to let the drive interpret your calculated LBA’s out into physical C/H/S addresses if you so desire…with DTB you can go as far as you’d like. We have previously documented how to have an external program communicate back to the DMM log files – we use those methods to write the resulting measurements of the three SEEK methods back to the log files. Extending DMM – how to run the test First, copy the new test executable (“DMMscsiSeekTest.exe”) to the root folder of your C: drive. Within the DMM Test Setup screen select the “External Program” test step type. Another dialog will pop up asking if there are any additional command-line arguments. This test does not use any so simply click “OK”. Then use the Browse button next to the “Firmware File/External Program Executable” file box to browse to and select the test in the C:\ root folder. Then click “Add this test to test sequence” and run the test on one or more drives. Test Results Running on a typical FC interface drive we see this entry in the log file: Summary Extending DMM to accomplish any test scheme is made possible with the External Program test step. In addition to the traditional idea of controlling environmental chambers or power supplies the STB Suite DTB api allows new tests that accomplish device I/O to run and report results back to the DMM logs.
Introduction SATA disk drives may have features which can be enabled or disabled. Some examples of SATA drive features are Write Cache enable/disable, Acoustic Management enable/disable with levels, Free-fall control enable/disable, etc. See the table at the end of this article for a current list of SATA FEATURES – as of the ATA-8 specification. Note – your drive may or may not implement all features. Refer to each individual drive’s IDENTIFY information to determine what features are implemented. Two types of Features The various Features are referred to by their FEATURE CODE. The SET FEATURES command The SET FEATURES command is a SATA, 28-bit, non-data command. The specific Feature to be set is specified in the commands FEATURE field, while the level of the Feature to be set is specified in the COUNT field, if applicable. As we have covered in previous articles and papers, sending a SATA command to a disk drive can be a complicated matter. Fortunately we have taken care of the details for you by writing a special executable program that will be called as a DMM test step.
DMM External Program Test Step The program “DMMSetFeatures.exe” is used to incorporate SATA SET FEATURE manipulation into your test environment. To use this program simply follow these simple steps:
Log Results Each drives .log file will show the results (pass or fail) of the SET FEATURE command, along with what the FEATURE and COUNT values were set to. Here is an example of a log showing one SET FEATURE command which succeeded, and another which failed (we specified an illegal FEATURE code)
Important Notes: The DMMSetFeatures program lets you enter any value into the FEATURE CODE or COUNT field, including illegal or invalid values. Take care to only enter valid values Getting the program If you have current Performa coverage you are entitled to get and use the program. Contact Jeremy Wolfe at jeremyw@scsitoolbox.com to request the program
Table of Features
In part one we introduced the CPS Command Probability Sequencer application, showing how to define commands and add them to the command execution list. In part 2 we will continue the introduction to CPS by showing the two execution modes, and analyze the CPS output using BAM. Executing the test – sending the commands in Sequential ModeReferring to the CPS setup we left off with, now turn your attention to the highlighted and commented sections show here: Note: our command sequence is made up of seven different commands, one of which has a DATA OUT phase, two of which have no data phase, and four of which have DATA IN. For this section we are going to issue the commands in the list in the order they appear – Sequential Mode. Clicking the “Start I/O” button will issue the sequence of commands over and over until 1,000 I/O’s have been executed. Examination of the I/O output via a BAM trace (viewed in Excel) we see our command sequence begin and repeat…
A quick look back at our CPS screen shows our command list… TEST UNIT READY INQUIRY MODE SENSE READ(10) – 1 block from LBA 65280 READ(10) – 32 blocks from LBA 0 WRITE(10) – 32 blocks to LBA 0 SEEK – to LBA 61440 Repeat… Asking Excel to tell us the total number of CDB’s gives us the number 1002 – there are always CDB’s issued at the beginning of the test run to confirm that the selected device exists, etc. These discovery commands are READ CAPACITY, INQUIRY. Thus BAM confirms that our command list was executed in the defined order, and that the number of I/O’s that we defined was the number of I/O’s generated. Executing the test – sending the commands in Random ModeNow we will explore the most powerful mode of CPS – Random Mode. In random mode CPS will generate the requested number of I/O’s – in the case of our example 1,000 – and will automatically insure that each command gets executed the number of times defined by each commands Probability Percentage. Rather than being executed in order as in Sequential Mode the command sequence will now be random. CPS will insure that each command gets issued the correct number of times, based on the Probability Percentage for each command and the Number of I/O’s to Issue number entered. Looked at this way our command list shows that we defined: TEST UNIT READY – 10% - should be executed 100 times… INQUIRY – 10% - should be issued 100 times… MODE SENSE – 20% - should be issued 200 times… READ(10) 1 block from LBA 65280 – 20% - should be issued 200 times… READ(10) 32 blocks from LBA 0 – 10% - should be issued 100 times WRITE(10) 1 block to LBA 0 – 10% - should be issued 100 times SEEK – to LBA 61440 – 20% - should be issued 200 times Let’s execute the test again now, this time in Random mode, and then examine the BAM trace… Looking at the BAM traces tells us that we actually had: 311 READ(10) commands issued (combination of the two defined READ commands…), 125 WRITE (10) commands issued, 188 SEEK commands issued, 106 TEST UNIT READY commands issued, 178 MODE SENSE (6) commands issued, 111 INQUIRY commands issued, For a total of 1019 commands. Pretty close to the 1,000 that we asked for, and the numbers of each command are pretty close to the percentages we specified. CPS does its’ best to meet the requested test parameters, sometimes its’ calculations will generate a few more I/O’s. Here is a picture of a piece of the trace, showing that the commands are not in any particular order – ConclusionCPS is a very powerful test tool. Sequential Mode is perfect for testing scenarios such as command compliance testing. Random mode is perfect for testing how a drive responds to random occurrences of random or illegal commands, or testing which simulates real-world situations.
Here is a list of some recent customer training sessions that STB has conducted - live, interactive web sessions presented by STB programmers:
Contact Jeremy Wolfe at (720) 249-2641 today to schedule your own custom training session!
|
|