Request Free Demo View shopping Cart Buy Now
SCSI Toolbox, LLC - The Industry Standard in SCSI/FC/iSCSI/ATAPI/SAS and SATA Testing Learn more about SCSI Toolbox, LLC
The SCSItoolbox© Suite is the most widely used and recognized diagnostic tool in the Industry!
         
Buy 
Home 
Training 
Support 
Products 
What's New 
Maintenance 
International 
Request Demo 
Release Notes 
Scrypt Crypt 
Newsletter 
Customers 
Alliances 
Contact 
Privacy 
Pricing 
About 
FAQ 
  

  

  

  
0
Are you interested in End-To-End data protection and/or Trusted command testing?
Yes
No



Scrypt Crypt

The SCSI Toolbox Scrypt Crypt has been created to allow free distribution of custom scripts that we have written, you have written, and to create a resource pool for you to draw upon to help you rapidly develop test solutions with our API's, SDK's, and SCSItoolbox modules.


Please note any of the Scripts downloaded here are for SCSI Toolbox products including the Developer Toolbox, ScriptWriter Pro, Stand Alone ScriptWriter Pro, and the SCSItoolbox. You must have one of the listed products installed to use these scripts. Please follow any specific instructions for using a particular script.

Categories
ScriptWriter Pro (SWP)
Category File Name Brief Description
Disk Tests diskread.bas This example illustrates using the SCSIDiskRead function to read consecutive blocks from a disk drive. If the read command fails the SCSIViewSense function is used to retrieve and display the sense data which describes the failure.
disktest.bas This is a complex example which uses a graphical interface that was generated with the "dlgdsn.exe" program.

The GUI allows the user to enter a host bus adapter number and a SCSI Target number. When the 'Scan Target' button is pressed an INQUIRY is issued and the inquiry data is displayed if a device responds at that address.

Once a device is chosen various tests can be executed on the drive.
DiskGetECCSpan.zip Retrieve the ECC length from a disk drive
DiskStartStop.zip Spin a disk up or down
DiskUnload.zip Eject media from a removeable type disk or CD
DiskWriteRead.zip Write & read & display data
GetDeviceType.zip retrieve & interpret device type
GetReadLongSize.zip  
DiskReadFUA.zip Disk reads with the Force Unit Access bit set
Sony AIT aitlog.bas This example illustrates using the SCSILogSense function to retrieve, parse and display Log Page data from a tape drive.

Below are the contents of the output file 'aitlogs.txt':
12/22/2003 12:59:18 PM

Vendor = SONY Product = SDZ-100 Version = 0100

Host adapter = 5 Target = 0 LUN = 0

Tape Log Page (30h) =
Current Number of Groups Written = 000
Current Number of RAW Retries = 405
Current Number of Groups Read = 003
Current Number of ECC-3 Retries = 00

Previous Number of Groups Written = 500
Previous Number of RAW Retries = 540
Previous Number of Groups Read = 000
Previous Number of ECC-3 Retries = 00

Total Number of Groups Written = 40500
Total Number of RAW Retries = 8405
Total Number of Groups Read = 00940
Total Number of ECC-3 Retries = 41450

Load Count = 00

Confirm Buffer Size BufferSize.zip Confirm the size of a DTB buffer
Compare Buffers CompareBuffers.bas Compare data between two DTB buffers
Decimal converted to Hex DEC2HEX.zip Convert a decimal integer into an array of four bytes for LBA use
READLONG command GetLongReadSize.bas Retrieve the correct size for the READLONG CDB
Get Tape Capacity GetTapeCapacity.bas Retrieve and display the tape capacity
Read Capacity ReadCapacity.zip Retrieve and display the Highblock number and Blocksize
Transfer Rate TransferRate.zip Calculate and display disk read transfer rate
Read Element Status ReadElStatus.bas Read Element Status
User Definded Command userdefined.bas This example illustrates issueing a user-defined SCSI CDB using the SCSIUserCdb function.

A cdb array is defined and filled the the values for a SCSI INQUIRY command. This command is issued and the data is displayed.
Inquiry loggerinq.bas This example illustrates using the SCSIInquiry, SCSIVendor, SCSIProduct, & SCSIVersion commands.

It also shows how to use the 'looger.exe' object to display data in a non-modal text box.

Inquiry.bas This example issues an INQUIRY command to the device specified by ha, target, & lun. The data from the INQUIRY command is stored in the array 'inqdata'.

The functions SCSIGetVendor, SCSIGetProduct, and SCSIGetVersion are also used to fill in strings with the respective data.
NewINQUIRY.zip Another example of displaying INQUIRY data


Developer Toolbox (DTB)
Visual C++
Category File Name Brief Description
Use Block Count and Queue Depth BC_QD_Testing.zip VCPSSL project that calls our VCSCSISetQueueDepth and VCSCSISetTransferMode API function.  In the name of the project, BC stands for “Block Count” and QD for “Queue Depth”
Discovery discover.zip This example project creates a command line program that uses the VCSCSIHostAdapterCount() function to return how many host adapters are present in the system.

A loop is executed using the VCSCSITargetCount() function to loop through all supported addresses on each HBA, issuing an INQUIRY command with the VCSCSIInquiry() function.

If a device responds to the INQUIRY command the functions VCSCSIGetVendor() and VCSCSIGetProduct() functions are used to retrieve this data.

To run the program open a command prompt window and run the executable.

Timing of CDB's TimingOfCDB.zip Visual Studio 6 project that shows how to time the I/Os.  Each I/O is a 1-block read (of block 0).  On the main screen you input HBA:Target:Lun and number of I/Os to issue.  After the test is done it displays the average time per I/O (in milliseconds).
 
.NET C#
Category File Name Brief Description
Sample UsingDTBFromCSharp.zip This is a sample project that just calls one of the API's in VB.PSSL and displays the version of the DLL.

 
Visual Basic
Category File Name Brief Description
Write Buffer to a file Buffer2File.zip Writing data from a DTB buffer into a file
Check random block CheckRandomBlock.zip Check random block
Compare Buffers CompareBuffers.zip Compare data between two DTB buffers
Rewind Tape Rewind.zip Rewind, rite data, write filemark, rewind,read tape test
Vendor Information Vendor.zip Retrieve & display the INQUIRY VENDOR data
Version Information Version.zip Retrieve & display the INQUIRY VERSION data
AND AND.zip Using the DTB Logical AND function
Disk Get ECC Span DiskGetECCSpan.zip Retrieve the ECC length from a disk drive
Disk Start or Stop DiskStartStop.zip Spin a disk up or down
Disk Unload DiskUnload.zip Eject media from a removeable type disk or CD
Disk Write, Read, Display DiskWriteRead.zip Write & read & display data
Get Device Type GetDeviceType.zip Retrieve & interpret device type
Get Read Long Size GetReadLongSize.zip Retrieve the correct size for the READLONG CDB
Disk Read FUA DiskReadFUA.zip Disk reads with the Force Unit Access bit set
Get Tape Capacity GetTapeCapacity.zip Retrieve and display the tape capacity
     
 
Disk Manufacturing Module (DMM)
Sequence Files - Open these files in the Disk Manufacturing Module
Category File Name Brief Description
External SATA SelfTest DMMSataSelfTest-90410.zip

By using the Developers Toolbox (DTB) api you can send any command to any type of device.

This example will illustrate how to run a SATA SMART Self Test as a DMM test step, logging the results to the DMM device log file.

Using Microsoft Visual Studio C++ and the STB Suite Developers Toolbox api we can send any command we need to any type of device. Since DMM is communicating with SATA devices via a SAS controller which implements SAT (SCSI->ATA Translation) such as the LSI 3800 or 3801 we must write our program to issue the SATA command imbedded into a SCSI command, according to the SAT standard.

Our example project retrieves the address of the drive from the command line arguments passed by DMM. In addition DMM allows you to pass additional user defined command line arguments to your program. For example, you could modify this project to allow you to specify any of the different SATA Self Tests.

Disk Purge Files DiskPurge-DMMfiles.zip

These files are used by Disk Manufacturing Module (DMM) to scrub/sanitize disks.

  • DiskPurge-long.seq – this test does three write passes of the entire drive, using three different data patterns. After each write pass an entire read pass with data compare is done to verify the data overwrite. Note: These read passes are not required to meet the DOD 5220-22m spec
  • DiskPurge-short.seq – this test does three write/verify passes of the entire drive using three different data patterns. It will run in half the time of the long test
  • DiskErase-Speedy.seq – this test does on complete overwrite of every block on the drive, using a random data pattern.
Data Scrubber Test DiskScrub.zip

This test sequence does:

  1. Writes entire drive with alternating 0/1 data pattern
  2. Reads entire drive doing data compare
  3. Writes entire drive with alternating 1/0 data pattern
  4. Reads entire drive doing data compare
  5. Writes entire drive with random data pattern
  6. Reads entire drive doing data compare

The test will fail if any WRITE or READ command fails, or if any data compare fails.

This is the same process done on DOD certified tests.

Disk Zap Block Zero DiskZapBlockZero.zip

Erases the first blocks of the disk. Useful to wipe out master boot records or other OS remnants

Disk Write All Blocks DiskWriteAllBlocks.zip

Writes all blocks of the drive using the block number as the data pattern

Disk Read All Blocks DiskReadAllBlocks.zip

Reads all blocks of the drive – insures that the drive is readable.

Disk Quick QC DiskQuickQC.zip
  1. Writes and read with data compare. 1000000 blocks at beginning, 100000, and 2000000 blocks into drive.
  2. 2 minute random access write/read with data compare
  3. Records P and G defects to log file at beginning and end of test
Disk Quick Data Erase DiskQuickDataErase.zip

Writes all blocks of disk using random data with LBA overlay

Disk DOD (Department of Devense) Erase DiskDODErase.zip

DOD compliant disk purge. Writes and reads three data patterns using data compare. Test will execute a total of 6 passes (3 write, 3 read) over the entire drive and may take a long time to complete.

Disk Physical Stress DiskPhysicalStress.zip
  1. 2 minutes of random access write/read with data compare, with FUA set on to force access to the drives physical media (rather than cache access).
  2. 2 spin down/spin up cycles
  3. 2 minutes of butterfly access write/read with data compare and FUA set on
  4. 2 spin down/spin up cycles
  5. 2 minutes of random access write/read with data compare and FUA set on

    All data patterns use random with LBA overlay
Disk Non Destructive 15 Minute Stress Test DiskNonDestructive
15MinStressTest.zip
  1. 2 minute random access read, 128 blocks/transfer, FUA set off
  2. 1 spin down/spin up
  3. 2 minute butterfly access read, 128 blocks/transfer, FUA set off
  4. 1 spin down/spin up
  5. 4 minutes random access read, as above
  6. 1 spin down/spin up
  7. 4 minute butterfly access read as above
Disk No Cache Media Integrity DiskNoCache
MediaIntegrity.zip
Write and read all blocks of the drive, random data pattern with LBA overlay, FUA set ON, data compare
Disk Confidence 1 DiskConfidenceNum1.zip
  1. The same functionality as the original STB “Disk Confidence Test 1”
  2. 1GB sequential write, incrementing data pattern
  3. 1GB sequential read with data compare
  4. 5000 random access seeks (1 block read)
  5. 4 spin down/spin up cycles
Disk Acceptance DiskAcceptance.zip
  1. Make sure blocksize is 512 bytes/block
  2. Make sure there are no more than 1 grown defect
  3. Spin up all drives
  4. Clear drive LOG pages
  5. Sequential write 1000000 blocks, LBA data pattern
  6. Sequential read 1000000 blocks with data compare
  7. 5 minute butterfly write/read with data compare
  8. Log number of primary and grown defects to log file
Disk Block Factor Performance DiskQuickQC.zip
Sequential writes and reads a 8, 32, 64, and 128 blocks pr transfer – see log files to see I/O performance at each block factor
15 Minute Non Destructive Butterfly Read 15MinuteNonDest
ButterflyRead.zip

A read only test – 15 minutes of butterfly access reads

15 Minute Destructive Butterfly 15MinuteDestructiveButterfly.zip
  1. 11 minutes of write, 4 minutes of read
  2. Incrementing data pattern with LBA overlay
  3. Data compare on reads
15 Minute Database 15MinuteDatabaseTest.zip
  1. Test to simulate a data server application
  2. 15 minute random write/read, random transfer lengths, data compare
 
Tape Manufacturing Module (TMM)
Sequence Files - Open these files in the Tape Manufacturing Module
Category File Name Brief Description
TapeQuickQC TapeQuickQC.zip

A quick test to verify data write/read and positioning

TapePositioning TapePositioningTest.zip

A test that writes file sets and file marks, then uses various space commands to move between file sets.

TapeMotionDataStress TapeMotionDataStress.zip
Various data patterns with compression on and off, plus positioning.
TapeLTOMediaGoodness TapeLTOMediaGoodness.zip
Uses LOG Pages and Cartridge MAM data to determine media wellness
TapeCompressionPerformance TapeCompression
Performance.zip
Tests using a 2:1 compressible data pattern, writes and reads with compression turned on and off. Logs drive LOG pages for compression calculation
TapeAcceptance TapeAcceptance.zip
A brief test that checks that the drive responds on the bus and can complete basic commands
Tape2G-2to1CompressOnOff Tape2G-2to1CompressOnOff.zip
Writes and reads 2G of 2:1 compressible data with compress set on and off. Clears LOG pages before each test, records LOG pages after each test
Tape 2GB - 2to1 Comp-badtape Tape2G-2to1Comp-badtape.zip
  1. Writes and reads 2GB of 2:1 compressible data with compress set on and off. Clears LOG pages before each test, records LOG pages after each test.
  2. Writes 3 files marks at beginning of tape, and skips over them during testing – to help test using a tape that is worn at the beginning of tape.
Tape 2 to 1 Compression 2to1Compression.zip
A simple write/read test that uses a 2:1 compressible data pattern. Check the logs to see transfer performance for write and read speeds.


These are just a few scripts to get you started with our PSSL's (Professional SCSI Scripting Library). If you would like to add scripts that you have written please email them (zipped) to support@scsitoolbox.com and we'll be glad to look at them and post them with your permission on the SCSI Toolbox - ScryptCrypt.

Have other Questions? Contact us here

 

 

 

 

 

 

 

 Copyright © 2003 - 2017 SCSI Toolbox, LLC. All rights reserved. | Visit stbsuite.com