📄 dt-usersguide.txt
字号:
and then a read verification pass is performed. If you wish to prevent the read verify pass, you must specify the "disable=verify" option. Special Notes: o Terminal devices are not closed between passes so previously set terminal characteristics don't get reset. This also caused a race condition when doing loopback testing with two processes. Page 4 Users Manual for November 10th, 2000 dt - Data Test Program Version 13.22 o When testing terminal (serial) devices, modem control is disabled (via setting CLOCAL) to prevent tests from hanging. If the "enable=modem" option is specified, then CLOCAL is reset, hangup on close HUPCL is set, and testing will not preceed until carrier or DSR is detected. This code is not fully tested, but this description accurately describes the code. o At the present time, tapes are rewound by closing the dev- ice, so you must specify the rewind device during testing if the read verify pass is being performed. This restriction will probably change in the next release since magtape con- trol commands will be supported (tape specific tests as well). o A special check is made for the /dev/ prefix, and if located, the O_CREAT open flag is cleared to prevent accidently creating files in this directory when not speci- fying the correct device name (very easy to do when running tests as super-user 'root'). o When writing to raw disks on Tru64 UNIX, if the disk was previously labeled, you must issue the "disklabel_-z" com- mand to destroy the label block or else you cannot write to this area of this disk (block 0). Failure to do this results in the error "Read-only file system" (errno=EROFS) being returned on write requests. Syntax: of=filename The output file to write. 4.3 Pattern File "pf=" Option. This option specifies a pattern file to use for the data pattern during testing. This option overrides the "pattern=" option and allows you to specify specialized patterns. The only restriction to this option is that the entire file must fit in memory. A buffer is allocated to read the entire pattern file into memory before testing starts so performance is not affected by reading the pattern file. Syntax: pf=filename The data pattern file to use. 4.4 Block Size "bs=" Option. This option specifies the block size, in bytes, to use dur- ing testing. At the present time, this option sets both the input and output block sizes. At the time I originally wrote this program, I didn't have the need for seperate block sizes, but this may change in a future release where I'll add back the Page 5 Users Manual for November 10th, 2000 dt - Data Test Program Version 13.22 "ibs=" & "obs=" options available with dd. Special Notes: o When enabling variable length records via the "min=" option, this also sets the maximum record size to be written/read. o For memory mapped files, the block size must be a multiple of the system dependent page size (normally 4k or 8k bytes). Syntax: bs=value The block size to read/write. 4.5 Log File "log=" Option. This option specifies the log file to redirect all program output to. This is done by re-opening the standard error stream (stderr) to the specifed log file. Since all output from dt is directed to stderr, library functions such as perror() also write to this log file. Special Notes: o A seperate buffer is allocated for the stderr stream, and this stream is set buffered so timing isn't affected by pro- gram output. o When starting multiple processes via the "procs=" option, all output is directed to the same log file. The output from each process is identified by the process ID (PID) as part of the message (errors & statistics). Syntax: log=filename The log file name to write. 4.6 POSIX Asynchronous I/O "aios=" Option. This option enables and controls the number of POSIX Asychronous I/O requests used by the program. Special Notes: o The default is to queue up to 8 requests. o This option is only valid for Tru64 UNIX systems are this time. o The system limit for AIO on Tru64 UNIX is dynamic, and can be queried by using the "sysconfig_-q_rt" command. o You can use the "enable=aio" option to enable AIO and use the default request limit. o AIO is only supported for character devices and is disabled for terminals. On Tru64 UNIX, you can alter the Makefile and link against libaio.a, which allows AIO with any Page 6 Users Manual for November 10th, 2000 dt - Data Test Program Version 13.22 device/file by mimic'ing AIO using POSIX threads. o AIO requests can not be cancelled on Tru64 UNIX, so queuing many requests to 1/2" tape devices will probably result in running off the end of the tape reel. This is not a problem for cartridge tapes. Syntax: aios=value Set number of AIO's to queue. 4.7 Buffer Alignment "align=" Option. This option controls the alignment of the normally page aligned data buffer allocated. This option is often useful for testing certain DMA boundary conditions not easily reproduced otherwise. The rotate option automatically adjust the data buffer pointer by (0, 1, 2, 3, ...) for each I/O request to ensure various boundaries are fully tested. Syntax: align=offset Set offset within page aligned buffer. or align=rotate Rotate data address through sizeof(ptr). 4.8 File Disposition "dispose=" Option. This option controls the disposition of test files created on file systems. By default, the test file created is deleted before exiting, but sometimes you may wish to keep this file for further examination, for use as a pattern file, or simply for the read verify pass of another test (e.g., reading the file via memory map API). Syntax: dispose=mode Set file dispose to: delete or keep. 4.9 Dump Data Limit "dlimit=" Option. This option allows you to specify the dump data limit used when data compare errors occur. The default dump data limit is 64 bytes. Syntax: dlimit=value Sets the data dump limit to value. Page 7 Users Manual for November 10th, 2000 dt - Data Test Program Version 13.22 4.10 Device Type "dtype=" Option. 4.11 Input Device Type "idtype=" Option. 4.12 Output Device Type "odtype=" Option. These options provide a method to inform dt of the type of device test to be performed. Without this knowledge, only gen- eric testing is possible. Special Notes: o On Tru64 UNIX systems, these options are not necessary, since this information is obtained via the DECIOCGET or DEVGETINFO IOCTL's: o Although the program accepts a large number of device types, as shown below, specific tests only exists for "disk", "tape", "fifo", and "terminal" device types. Others may be added in the future. o In the case of "disk" device type, dt reports the relative block number when read, write, or data compare errors occur. o Also for "disk" devices, dt will automatically determine the disk capacity if a data or record limit is not specified. This is done via a series of seek/read requests. o On each operating system supported, string compares are done on well known device names to automatically select the dev- ice type. For example on QNX, "/dev/hd" for disk, "/dev/tp" for tapes, and "/dev/ser" for serial lines. o The device type gets displayed in the total statictics. Syntax: dtype=string Sets the device type. idtype=string Sets the input device type. odtype=string Sets the output device type. The Valid Device Types Are: audio comm disk graphics memory mouse network fifo pipe printer processor socket special streams tape terminal unknown Note: Although dt does not provide specific test support for each of the devices shown above, its' design makes it easy to add new device specific tests. Specific support exists for disk, fifo, pipe, tape, and terminals. Support for "ptys" may be added in the future as well. Page 8 Users Manual for November 10th, 2000 dt - Data Test Program Version 13.22 4.13 Error Limit "errors=" Option. This option controls the maximum number of errors tolerated before the program exits. Special Notes: o The default error limit is 1. o All errors have a time stamp associated with them, which may be useful for characterizing intermittent error conditions. o The error limit is adjusted for read, write, or data compare failures. This limit is not enforced when flushing data, or for certain AIO wait operations which are considered non- fatal (perhaps this will change). o A future release may support an "onerr=" option to control the action of errors (e.g., loop, ignore (continue), or exit). Syntax: errors=value The number of errors to tolerate. 4.14 File Limit "files=" Option. This option controls the number of tape files to process with tape devices. Special Notes: o During the write pass, a tape file mark is written after each file. After all files are written, 1 or 2 file marks will be written automatically by the tape driver when the device is closed. o During reads, each file is expected to be terminated by a file mark and read() system calls are expected to return a value of 0 denoting the end of file. When reading past all tapes files, an errno of ENOSPC is expected to flag the end of media condition. o Writing tape file marks is currently not supported on the QNX Operating System. The release I currently have does not support the mtio commands, and unfortunately the POSIX stan- dard does not define this interface (the mtio interface appears to be a UNIX specific standard). Multiple tape files can still be read on QNX systems however. Syntax: files=value Set number of tape files to process. Page 9
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -