diskx(8)diskx(8)NAMEdiskx - disk exerciser program
SYNOPSIS
/usr/field/diskx [option(s)] [parameter(s)]
OPTIONS
The following is a description of the diskx options: Help. Displays a
help message describing test options and functionality. Performance
test. Read and write transfers will be timed to measure device
throughput. No data validation is performed as part of this test.
Testing will be done using a range of transfer sizes if the -F option
is not specified. The transfer size used for testing a range of record
sizes will start at the minimum value and be incremented by the recip‐
rocal of the number of specified “splits”. For example if the number
of splits is set to 10, the transfer size will start at the minimum
value, the next transfer size will be the minimum value added to 1/10th
of the range of values, similarly the next transfer size will increase
by 1/10th of the range during each testing interval. If a specific
number of transfers are not specified, the transfer count will be set
to allow the entire partition to be read or written; this number will
vary depending on the transfer size and the partition size. The perfor‐
mance test will run until completed or interrupted and is not time lim‐
ited by the -minutes parameter. This test may take a long time to com‐
plete depending on the test parameters.
To achieve maximum throughput, specify the -S option to cause
sequential transfers. If the sequential attribute is not speci‐
fied, transfers will be done to random locations which may slow
down the throughput due to associated head seeks on the device.
Read-only test. Reads from the specified partitions.
This test is useful for generating system I/O activity. Because
it is a read-only test, it is possible to run more than one
instance of the exerciser on the same disk. Use the -num_xfer
option with the -r option. Write test. The purpose of this
test is to verify that data can be written to the disk and read
back for validation. Seeks are also done as part of this test.
This test provides the most comprehensive coverage of disk
transfer functionality due to the usage of reads, write, and
seeks. The test also combines sequential and random access pat‐
terns.
The test performs the following operations using a range of
transfer sizes. A single transfer size will be utilized if the
-F attribute is specified. The first step is to sequentially
write the entire test partition (unless the number of transfers
has been specified using -num_xfer). Next the test partition is
sequentially read. The data read from disk is examined to
insure that it is the same as what was originally written. At
this point if random transfer testing has not been disabled
(using the -S attribute) then writes will be issued to random
locations on the partition. After completion of the random
writes, reads will be issued to random locations on the parti‐
tion. The data read in from random locations will be examined
for validity.
The following options are testing attributes which modify how tests are
to be run. (Stop on error.) This causes testing to halt upon detection
of all errors except data validation errors and the accumulated test
results will be displayed. This option is associated with the -p, -r,
and -w tests. (Stop on Data Validation error.) This causes testing to
halt upon detection of a data validation error. The accumulated test
results will be displayed. The failing LBA and 10 lines of the data
expected and the data returned will also be displayed. This option
is associated with the -w test. Perform fixed size transfers. If this
option is not specified transfers will be done using random sizes.
This attribute is associated with the following tests: -p, -r, -w.
Interactive mode. Under this mode the user will be prompted for vari‐
ous test parameters. Typical parameters include the transfer size and
the number of transfers. The following scaling factors are allowed: k
or K -- kilobyte (1024 * n) b or B -- block (512 * n) m or M --
megabyte (1024 * 1024 * n)
For example 10k would specify 10240 bytes. Perform the speci‐
fied test once. If this option is specified with the sequential
transfer attribute, the test will halt after the entire disk has
been read or written. This attribute is associated with the -r
and -w tests. Do not perform performance analysis of read
transfers. This will cause only write performance testing to be
performed. To perform only read testing and to skip the write
performance tests the -R attribute must be specified. This
attribute is associated with the following tests: -p. Opens the
disk in read-only mode. This attribute is associated with all
tests. Performs sequential transfers. In order to achieve max‐
imum throughput the -S attribute should be specified on the com‐
mand line. Transfers will be performed to sequential disk loca‐
tions. This may slow down the observed throughput due to associ‐
ated head seeks on the device. If this option is not specified
transfers will be done to random disk locations. This attribute
is associated with the following tests: -p, -r, -w. Directs
output to the terminal. This attribute is useful when output is
directed to a logfile using the -o option. By also specifying
this parameter after the -o filename options will cause output
to be directed to both the terminal and the log file. This
attribute is associated with all tests. Does not check for disk
labels or partition overlaps. This option should be used when
testing DRD (Distributed Raw Disk) or LSM (Logical Storage Man‐
ager) devices. See the -f and -x options also. If any of the
selected tests write to the disk, the disk will be examined for
any existing file systems. If it appears that file systems
exist, the exerciser will prompt for confirmation before pro‐
ceeding. When this attribute is specified the exerciser will
NOT prompt for confirmation before proceeding.
The following options are used to specify test parameters. These
options are followed by an associated parameter specification. Test
parameters may also be modified in an interactive manner. Refer to the
description of the -i test attribute for details. To specify a numeri‐
cal value, type the parameter name followed by a space and then the
number. For example -perf_min 512
The following scaling factors are allowed: k or K -- kilobyte (1024 *
n) b or B -- block (512 * n) m or M -- megabyte (1024 * 1024 * n)
To illustrate this, -perf_min 10K, causes transfers to be done in sizes
of 10240 bytes. Specifies a code to be imbedded in the high byte of a
long word pattern. This option is only valid with 64 bit patterns,
-pattern 8 or -pattern 99. See also the -pattern option. This parame‐
ter is associated only with the -w test option. Specifies the level of
diagnostic output to display. The higher this number is, a greater
volume of output will be produced describing the operations the exer‐
ciser is performing. This parameter is associated with all tests.
Specifies the maximum number of error messages may be produced as a
result of an individual test. Limits on error output is done to pre‐
vent a flooding of diagnostic messages in the event of persistent
errors. This parameter is associated with all tests. Specifies which
device special file to test. The devname parameter is the name associ‐
ated with either a block or character special file which represents the
disk to be tested. The device special files are located in /dev/disk
and named dskNx, where N is the number of the device and x is a letter
representing the partition. For example, /dev/disk/dsk0a refers to
partition a of disk 0. If no partition is specified, it is assumed that
testing is to be done to all partitions. For example if the specified
devname is /dev/disk/dsk0 then testing will be done to all partitions.
For raw device names, you must specify the device special files in the
/dev/rdisk directory, which have the same dskNx format. For example,
/dev/rdisk/dsk0a. This parameter must be specified and is associated
with all tests.
On a cluster system using DRD devices, or when using LSM, use
the -x option with the -f option to specify the pathname. You
must also use the -X option and specify a value for the the
-numb_blocks option when using -x. (See the EXAMPLES section).
Specifies how many minutes to allow testing to continue. This
parameter is associated with the following tests: -r, -w. Spec‐
ifies the maximum transfer size to be performed. When transfers
are to be done using random sizes, the sizes will be within the
range specified by the -max_xfer and -min_xfer parameters. If
fixed size transfers are specified (see the -F test attribute)
then transfers will be done in a size specified by the -min_xfer
parameter. Transfer sizes to the character special file should
be specified in multiples of 512 bytes. If the specified trans‐
fer size is not an even multiple the value will be rounded down
to the nearest 512 bytes. This parameter is associated with the
following tests: -r, -w. Specifies the minimum transfer size to
be performed. This parameter is associated with the following
tests: -r, -w. Specifies the range of disk blocks that diskx
should use. Use this option when testing DRD devices or when
using LSM. Specifies how many transfers to perform before
changing the partition that is currently being tested. This
parameter is only useful when more than one partition is being
tested. If this parameter is not specified then the number of
transfers will be set to be enough to completely cover a parti‐
tion. This parameter is associated with the following tests: -r,
-w. Sends output to the specified filename. The default is to
not create an output file and send output to the terminal. This
parameter is associated with all tests. This option specifies
the write pattern to be used when exercising a disk. 1 indi‐
cates a byte pattern (8 bits) 2 indicates a short word pattern
(16 bits) 4 indicates a int word pattern (32 bits) 8 indicates a
long word pattern (64 bits) 99 indicates a repeating pattern (64
bits)
The default is a long word pattern (64 bits). This parameter is
associated only with the -w test option. See also the -code
option. Specifies the maximum transfer size to be performed.
When transfers are to be done using random sizes, the sizes will
be within the range specified by the -perf_min and -perf_max
parameters. If fixed size transfers are specified (see the -F
test attribute) then transfers will be done in a size specified
by the -perf_min parameter. This parameter is associated with
the following tests: -p. Specifies the minimum transfer size to
be performed. This parameter is associated with the following
tests: -p. Specifies how the transfer size will be changed when
testing a range of transfer sizes. The range of transfer sizes
is divided by perf_splits to obtain a transfer size increment.
For example if perf_splits is set to 10, tests will be run by
starting with the minimum transfer size and increasing the size
by 1/10th of the range of values for each test iteration. The
last transfer size will be set to the specified maximum transfer
size. This parameter is associated with the following tests: -p.
Specifies the number of transfers to be performed in performance
analysis. If this value is not explicitly specified the number
of transfers will be set equal to the number required to read
the entire partition. This parameter is associated with the fol‐
lowing tests: -p. Specifies not to apply partition logic &
checks. This flag is most likely to be used when pseudo device
drivers such as DRD (Distributed Raw Disk) or LSM (Logical Stor‐
age Manager) are being used and the device type has no parti‐
tions. In such cases, the device special file as specified on
the command line is used rather than a constructed name that
appends a letter signifying the partition. When using -x with
the read, write, and performance tests you must specify the num‐
ber of blocks on the device using the -num_blocks option.
(Without any partition logic it is impossible for disks to auto‐
matically size the partition.)
DESCRIPTION
The diskx program is intended to test various aspects of disk driver
functionality. These tests provide more comprehensive functional cover‐
age than the dskx utility. Main functional areas which are tested
include: Read testing. Write testing. Seek testing. Performance
analysis.
Some of the tests involve writing to the disk. For this reason the
exerciser should be used with caution on disks which may contain useful
data which could be over-written. Tests which write to the disk will
first check for the existence of file systems on the test partitions
and partitions which overlap the test partitions. If a file system is
found on these partitions, a prompt will appear asking if testing
should continue.
There are a number of options that diskx accepts. These options con‐
trol which tests are performed and also specify parameters of test
operation.
PROGRAM OUTPUT
The following are descriptions of some of the tables which are produced
by the disk exerciser.
This is the header used to describe the results of the transfer tests
followed by a description of each column:
Disk Transfer Statistics
Part Seeks Seek_Er Writes Writ_Er MB_Write Reads Read_Er MB_Read
Data_Er
A letter used to represent the disk partition. The number of seek sys‐
tem calls that were issued. The number of seek system calls returning
error status. The number of write system calls issued. The number of
write system calls returning error status. The number of megabytes of
data written. The number of read system calls issued. The number of
read system calls returning error status. The number of megabytes of
data read. The number of transfers which had data validation errors.
This does not specify the number of bytes that were in error; rather it
specifies that the transfer had at least one byte in error.
This header is used to describe the results of the performance tests.
Performance test results:
Part- Transfer Count of Read Write Transfer
ition Size Transfers Rate Rate Errors
A letter used to represent the disk partition. This is the size of the
read or write system call. Specifies the number of read or write sys‐
tem calls. The observed disk throughput obtained by timing the speci‐
fied number of read system calls. The observed disk throughput
obtained by timing the specified number of write system calls. Shows
how many read and write system calls resulted in a return value of
error status. If this value is nonzero then the values displayed in
the Read and Write Rate columns may not accurately reflect correct
device performance.
EXAMPLES
The following are example command lines with a description of what the
resulting test action will be. The example below will perform read-
only testing on the character device special file that dsk0 represents.
Since no partition is specified, reading will be done from all parti‐
tions. The default range of transfer sizes will be used. Output from
the exerciser program will be displayed on the terminal. diskx-f
/dev/rdisk/dsk0 -r The following example performs read-only testing on
an LSM volume. diskx-x -X -f /dev/vol/vol1 -r -num_blocks 100000 Per‐
formance tests will be run in the “a” partition of dsk0. Program output
will be logged to the file diskx.out. The -S option will cause sequen‐
tial transfers for best test results. Testing will be done over the
default range of transfer sizes. diskx-f /dev/disk/dsk0a -o diskx.out
-p -n -S This command will run the read test on all partitions of the
disks. The disk exerciser is being invoked here as 3 separate pro‐
cesses. In this manner the 3 processes will be generating a lot of
system I/O activity. This may be useful for system stress testing pur‐
poses. diskx-f /dev/rdisk/dsk0 -r &; diskx-f /dev/rdisk/dsk1 -r \ &;
diskx-f /dev/rdisk/dsk2 -r & This command will run the write test on
partition “b” of disk 17. diskx-f /dev/rdisk/dsk17b -w -pattern 99
The repeating long word pattern will write the following test
pattern to the disk: resulting test pattern written: <address>
<quad word> <quad word> ... 0000020 0007060504030201
0007060504030201 0000030 0007060504030201 0007060504030201
0000040 0007060504030201 0007060504030201 ... This command
will run the write test on partition “b” of disk 17. diskx-f
/dev/rdisk/dsk17b -w -pattern 8 -code 255
The specified pattern and code will write the following test
pattern to the disk: resulting test pattern written: <address>
<quad word> <quad word> .... 0000020 ff00000000000004
ff00000000000005 0000030 ff00000000000006 ff00000000000007
0000040 ff00000000000008 ff00000000000009 ...
SEE ALSO
Commands: cmx(8), fsx(8), memx(8), shmx(8), tapex(8)
Functions: getdiskbyname(3)
Files: disktab(4)
Cluster Administration
diskx(8)