Content-type: text/html
Disktest will use the device specified by filespec. If no option is specified otherwise, disktest will attempt to determine filespec type. Fully qualified path must be give when filespec is not a normal file. This will help to determine it's type.
k = 1024, K = 10^3, m = 1024^2, M = 10^6, g = 1024^3, G = 10^9
m = 60, h = 60*60, d = 60*60*24
The r (raw) type is used when binding a block device to a raw device, see raw(8). Disktest will align it's buffers correctly to support raw devices.
The b (block) type is used when block IO is desired. The buffer_cache will be used during testing. Buffer alignment is not required for this type of IO operation.
The f (file) type is used when accessing a file. If the file does not exist then it will be created. If the file exists, then it will opened; see O_CREAT in open(2) for more details. Access to the file is performed through the file system that the file is stored on. Adding an S modifier to the F (file) type opertaions will force an fsync(2) to occur on every write.
Adding d will open with the O_DIRECT flag set. If this option is used, then I/O is limited to being aligned to the file systems block size. When transferring to a block device w/o a file system, then alignment is to 1k. These limits have been verified with the 2.4.9 kernel and the o_direct patch from AA.
Adding s sync_interval Specifies that a sync should occur at sync_interval number of write IO operations. The default is to sync on every IO.
Disktest will report a failure if filespec does not match the IO_type specified. If no type is specified, then disktest will attempt to determine the file type by using stat(2).
X - Number of transfers
P - Display performance data in ';' delimited format
R - Display runtime
C - Display cycle performance details
A - Display all performance options
If no IOs complete in ioTimeout seconds, then disktest will consider the test to fail. The default is now 60 secs, which means that if there are no IO operations to a target from any thread that complete in 60 secs then the test will stop with a failed status, and an ERROR message stating the there is a possible hung IO condition, if it is a true hung IO condition, then disktest IO threads will not terminate with a non-preemtable kernel, and the only error message with be from the ioTimeout ERROR message. To disable this feature, set the io timeout to 0, which means that the IO timeout time will never be reached which is how disktest operated before this feature was added. The minute, m, hour, h, and day, d, multipliers can also be used on these perameter. The following are examples of -t usage.
-t0:2h, is no IO delay, with a 2 hour IO timeout.
-t30, is a 30 msec delay, with default IO timeout.
-t300:1000:1m, is a random delay between 300:1000 msec, with a 1 minute io timeout.
This will start a read test to blocks 10 through 15. Seeks are linear and will be performed starting at 10 going to 15 then back to 10. 35 seeks will be performed. The block size 256k and there will be three threads. Also, total transfer and throughput will be displayed at the end of the test.
disktest -r -w -D30:70 -K2 -E32 -B 8192 -T 600 -pR -Ibd /dev/sdzz
This will start a write and read test were the work load is 30% reads and 70% writes. There will be two threads and all read data will be checked for errors up to 32 bytes. The block size is 8k and the test will run for 600 seconds. Seeks will be random and /dev/sdzz will be opened with the O_DIRECT flag set.
disktest -K8 -t500:15000:120s ./testfile
This will start eight read threads, with a minimum read delay of 500 milliseconds, and a maximum of 15 seconds.
disktest -w -Is200 -R3:60000 -Ac -PRTX -B128k -T10 -pr ./afile
This will start four write threads, syncing every 200 IOs. If there is a error on any write, then the same IO will be retried up to 3 times, and the thread will wait for 60 seconds before attempting each retry. If there is an error during the test, just continue on, reporting all errors as warnings.
disktest -Ag -Am -B 16k -C 100 -K 1 -z -ma -pL -P A -S 0:20000 -r -w -E 0 -N 640032 ./afile
Start a read/write test with error checking for 100 cycles. If there is an error, then write out the special marker to LBA 0 of the target, and stop all testing. You random data, and all header markers.
| 11/12/01-02:05:01 | START | 1314 | v1.2.3 | /dev/sdaa | Start args: -S100:105 -K5 -pid -r -PTX -L 25 -B 1 -z /dev/sdaa
| 11/12/01-02:05:01 | STAT | 1314 | v1.2.3 | /dev/sdaa | 12800 bytes read in 25 transfers.
| 11/12/01-02:05:01 | STAT | 1314 | v1.2.3 | /dev/sdaa | Read Throughput 12800B/s, IOPS 25/s.
| 11/12/01-02:05:01 | END | 1314 | v1.2.3 | /dev/sdaa | Test Done (Passed)
disktest -w -pl -N200000 -B128k test.fil
This will create a ~97MB file named test.fil in the current directory writing at 131072B per transfer. Once this completes any type of IO test can be performed to this file. This can also be done by creating a sparce file by doing the following:
disktest -w -pl -K1 -L1 -S200000 test.fil
non-destructive: will read lba/write lba with read data/then read lba to verify
min seek: force a minimum seek distance during any IO access
max seek: force a maximum seek distance during any IO access
WORO: all blocks will be written and read only once
WRWR: a block will be written then read then written then read
retry: number of times an I/O should be retried, after an error, before counting as a failure