tapex(8) System Manager's Manual tapex(8)
Name
tapex - tape exerciser program
Syntax
tapex [ option(s) ] [ parameter(s) ]
Description
The program tests tape driver functionality. These tests provide more comprehensive functional coverage than the utility which does simple
start/stop oriented read/write testing. Functions that are tested include:
o Writing records onto a tape and verifying the records
o Using records in a range of sizes
o Record-length testing
o Random record-size testing
o Positioning tests for records and files
o Writing and reading past the end of media
o End-of-file testing
o n-buffered I/O testing
o Tape-transportability testing
o Bandwidth performance analysis
o Media loader testing
o Reporting of tape contents
When is run, a writable tape must be loaded in the drive being tested, and the drive must be online.
Options
Some options cause specific tests to be performed, for example, an end-of-media test. Other options modify the tests, for example,
enabling caching. The options are as follows:
-a Performance measurement test that calculates the tape transfer bandwidth for writes and reads to the tape by timing data transfers.
-b Continuously runs the write/read tests until the process is killed. This flag can be used in conjunction with the or flag.
-c Enables caching on the device, where supported. This does not specifically test caching, but it enables the use of caching on a tape
device while running the other tests.
-C Disables caching on TMSCP tape devices. If the tape device is a TMSCP unit, then caching is the default mode of test operation. This
flag causes the tests to be run in noncaching mode.
-d Tests the ability to append to the media. First, the test writes records to the tape. Then, it repositions back one record and
appends additional records. Finally, the test does a read verification. This test simulates the behavior of the switch.
-e End-of-media test. This test first writes data to fill up a tape, which may take a long time for long tapes. It then does reads and
writes past the end of media, which should fail. Next it enables writing past end of media, writes to the tape, and reads back the
records for validation.
-E Runs an extensive series of tests in sequential order. Due to the large number of tests, this option takes a long time to complete.
Depending on tape type and cpu type, this series of tests can take up to 10 hours to complete.
-f /dev/rmt#?
Specifies the name of the device special file that corresponds to the tape unit being tested. The number sign (#) symbol represents
the unit number. The question mark (?) argument can be the letter for the high density device or the letter for the low density
device. The default tape device is
-F File-positioning tests. First, files are written to the tape and verified. Next, every other file on the tape is read. Then, the
previously unread files are read by traversing the tape backwards. Finally, random numbers are generated; the tape is positioned to
those locations, and the data is verified. Each file uses a different record size.
-G File-positioning tests on already-written tape. This flag can be used in conjunction with the flag to run the file position tests on
a tape that has already been written to by a previous version of the test. For this to work, the same test parameters, for example
record size and number of files, must be used as when the the tape was written. No other data should have been written to the tape
since the previous test.
-g Random record-size tests. This test writes records of random sizes. It reads in the tape, specifying a large read size; however,
only the amount of data in the randomly-sized record should be returned. This test only checks return values and does not validate
record contents.
-h Displays a help message describing the tape exerciser.
-i Interactive mode. Under this mode, the user is prompted for various test parameters. Typical parameters include the record size and
the number of records to write. The following scaling factors are allowed:
k or K for kilobyte (1024 * n)
b or B for block (512 * n)
m or M for megabyte (1024 * 1024 * n)
For example, 10k would specify 10240 bytes.
-j Write phase of the tape-transportability tests. This test writes a number of files to the tape, and then verifies the tape. After a
successful verification, the tape is brought offline to be moved to another tape unit and read in with the option. The purpose of
this test is to prove that a tape can be written on one drive and read by another drive. Note that the test parameters for the phase
of the transportability test must match the parameters of the test. Any changes of test parameters from the defaults should also be
changed during the test.
-k Read phase of the tape-transportability tests. This test reads a tape that was written by the test and verifies that the expected
data is read from the tape. Success of this test proves that a tape can be written on one drive and read on another. As stated in
the the description of the option, any parameters changed in the test must also be changed in the test.
-L Media loader test. For sequential stack loaders, the media is loaded, written to, and verified. Then the media is unloaded, and the
test repeats on the next piece of media. This verifies that all the media in the input deck is writable. To run this test in read-
only mode, also specify the option.
-l End-of-file test. This test verifies that a zero byte count is returned when a tape mark is read and that another read will fetch the
first record of the next tape file.
-m Displays tape contents. This is not a test; it reads the tape sequentially and prints out the number of files on the tape, the number
of records in each file, and the size of the records within the file. The contents of the tape records are not examined.
-N Disables the usage of n-buffered I/O on tests that support its usage. (See for a description of n-buffered I/O.)
-o filename
Sends output to the specified filename. The default is to not create an output file and send output to the terminal.
-p Runs both the record and file positioning tests. (See the and options.)
-q Command timeout test. This test verifies that the driver allows enough time for completion of long operations. The test consists of
writing files to fill up the tape. Next a rewind is performed followed by a forward skip out to the last file. The test is success-
ful if the forward skip operation completes without error.
-r Record-size test. A number of records are written to the tape and then verified. This process is repeated over a range of record
sizes.
-R Record-positioning test. First, records are written to the tape and verified. Next, every other record on the tape is read. Then,
the other records are read by traversing the tape backwards. Finally, random numbers are generated; the tape is positioned to those
locations, and the data is verified.
-s Record-size behavior test. Verifies that a record read will return at most one record or the read size, whichever is less.
-S Single record size test. This option modifies the record-size test ( option).
-T Copies output to standard output. This flag is useful if you want to log output to a file with the option and also have the output
displayed on standard output. This flag must be specified after the flag in the command line.
-v Verbose mode. This option causes more detailed terminal output of what the tape exerciser is doing. For example, it lists operations
the exerciser is performing, such as record counts, and more detailed error information.
-V Very verbose mode. This option causes more output to be generated than either the default mode or the flag. The output consists of
additional status information on exerciser operation.
-w Opens the tape as read-only. This mode is only useful for tests that do not write to the media. For example, it allows the test to
be run on a write-protected media.
-Z Initializes read buffer to the nonzero value 0130. This may be useful for debugging purposes. If the flag is not specified, all ele-
ments of the read buffer will be initialized to 0. Many of the tests first initialize their read buffer and then perform the read
operation. After reading a record from the tape, some tests validate that the unused portions of the read buffer remain at the value
to which they were initialized. As a debugging tool, it may in some cases be useful to have this initialized value set to be nonzero.
In those cases, the arbitrary character 0130 can be used.
Parameters
You can change the default test parameters either by using the option described previously or by specifying the parameters in the command
line. This section describes the parameters you can set in the command line, listed with the associated test.
To specify a value, type the parameter name followed by a space and then the number. For example 512 specifies a minimum record size of
512 blocks. The following scaling factors are allowed:
k or K for kilobyte (1024 * n)
b or B for block (512 * n)
m or M for megabyte (1024 * 1024 * n)
For example, 10K would specify 10240 bytes.
These parameters are associated with the option
-perf_num The number of records to write and read.
-perf_rs The size of records.
These parameters are associated with the option
-tar_num The number of additional and appended records.
-tar_size The record size for all records written in this test.
These parameters are associated with the option
Note that specifying too much data to be written past EOM could cause a reel-to-reel tape to go off the end.
-end_num The number or records written past EOM.
-end_rs The record size.
These parameters are associated with the option
-num_fi The number of files.
-pos_ra The number of random repositions.
-pos_rs The record size.
-rec_fi The number of records per file.
This parameter is associated with the option
-rand_num The number of records to write and read.
These parameters are associated with the options and
-tran_file
The number of files to write or read.
-tran_rec The number of records contained in each file.
-tran_rs The size of each record.
These parameters are associated with the option
-pos_num The number of records.
-pos_ra The number of random repositions.
-pos_rs The record size.
These parameters are associated with the options and
-inc The record increment factor.
-max_rs The maximum record size.
-min_rs The minimum record size.
-num_rec The number of records.
-t Sets a time limit in minutes on how long to run the record-size test ( option). The default is to run the test to completion.
These parameters are associated with the option
-num_rec The number of records.
-size_rec The record size.
This parameter is used in any test which supports n-buffered I/O:
-num_nbuf The number of buffers to use.
This parameter is associated with all tests:
-err_lines
The threshold on error printouts.
Examples
This example runs a series of tests on tape device and sends all output to a file called
tapex -f /dev/rmt1h -E -o tapex.out
This example runs the end-of-media test on tape device Verbose mode is specified, which causes additional output. By default, output is
directed to the terminal.
tapex -f /dev/rmt4h -v -e
This example performs read/write record testing. By default, this test runs on the default tape device and output is sent to the terminal.
tapex -r
This example performs read/write record testing using record sizes in the range 10k to a maximum record size of 20k. By default, this test
runs on the default tape device and output is sent to the terminal.
tapex -r -min_rs 10k -max_rs 20k
See Also
mtx(8)
Guide to System Exercisers
tapex(8)