1dt(1) General Commands Manual dt(1)
2
3
4
6 dt - Data Test Program
7
9 dt [options]
10
11
13 Use of this program is almost guaranteed to find problems and cause
14 your schedules to slip. If you are afraid to find bugs or otherwise
15 break your system, then please do not use this program for testing.
16 You can pay now or pay later, but you've been warned!
17
18
20 dt is a generic data test program used to verify the proper operation
21 of peripherals and I/O sub-systems, and for obtaining performance
22 information. Since verification of data is performed, dt can be thought
23 of as a generic diagnostic tool.
24
25 Although the original design goals of being a generic test tool were
26 accomplished, it quickly become evident that device specific tests,
27 such as terminals, and different programming interfaces such as memory
28 mapped files and POSIX asynchronous I/O API's were necessary. There‐
29 fore, special options were added to enable these test modes and to
30 specify necessary test parameters.
31
32 dt command lines are similar to the dd program, which is popular on
33 most UNIX systems. dt contains numerous options to provide user control
34 of most test parameters so customized tests can be written easily and
35 quickly by specifying simple command line options. Since the exit sta‐
36 tus of the program always reflects the completion status of a test,
37 scripts can easily detect failures to perform automatic regression
38 tests.
39
40 dt has been used to successfully test disks, tapes, serial lines, par‐
41 allel lines, pipes & FIFO's, memory mapped files, and POSIX Asynchro‐
42 nous I/O. In fact, dt can be used with any device that supports the
43 standard open, read, write, and close system calls. Special support is
44 necessary for some devices, such as serial lines, for setting up the
45 speed, parity, data bits, etc, but dt's design provides easy addition
46 of this setup.
47
48 Most tests can be initiated by a simple dt command line, and lots of
49 I/O can be initiated quickly using multiple processes and/or POSIX AIO,
50 for those operating systems supporing AIO. More complex tests are nor‐
51 mally initiated by writing shell scripts and using dt in conjunction
52 with other tools, such as scu (SCSI Command Utility). Several shell
53 scripts for testing disks, tapes, and serial lines are also supplied
54 with this kit which can used as templates for developing other special‐
55 ized test scripts.
56
57 Specific system features are now being added to dt so more extensive
58 testing can be accomplished. The program has been restructured to allow
59 easy inclusion of new device specific tests by dispatching to test
60 functions through a function lookup table. This table gets setup auto‐
61 matically, based on options enabled, or via the device type "dtype="
62 option.
63
64 WARNING: dt does not perform any sanity checking of the output device
65 specified. This means if you are running as root on Unix and you spec‐
66 ify a raw disk device, dt will overwrite existing file systems, so
67 please be careful! I HATE TO ADMIT, I'VE DONE THIS MYSELF!
68
69
71 dt is conditionalized to run on AIX, HP-UX, SUN, ULTRIX, OSF, QNX, SCO
72 Unixware, Windows, and Linux operating systems. Porting is simple for
73 OSes with POSIX APIs.
74
75
77 Those people with an imagination will find many uses for dt, but I'll
78 list a few I've used it for, just to whet your appetite:
79
80 · Testing of tape devices using different block sizes to determine
81 the best blocking factor for optimum performance and capacity.
82 This is very important for streaming tapes devices.
83
84 · Write tapes to end of tape, to determine the total tape capac‐
85 ity. This gives the total data capacity of tapes, after inter-
86 record gaps, preamble/postambles, or pad blocks are written on
87 the tape.
88
89 · Read existing tapes with data comparison disabled, to determine
90 the amount of data on the tape. This is useful to determine how
91 much disk space is required to read in a tape, or to simply ver‐
92 ify the tape can be read without errors.
93
94 · Reading/writing an entire tape to ensure device drivers properly
95 sense and handle end of tape error conditions.
96
97 · Write a tape and ensure it can be read on another tape drive to
98 test drive compatibility (also referred to as transportability).
99
100 · Read multiple tape files to ensure file marks and end of tape
101 are reported and handled properly by tape drivers.
102
103 · I/O to disks using the raw device interface, to determine the
104 optimum performance of the controller. This usually gives a good
105 indication of how well the controller cache or read-ahead
106 improves I/O performance for sequential or random file access.
107
108 · I/O to disk files through the file system, to determine the
109 affect the buffer cache has on write and read performance. You
110 must know the characteristics of your O/S's buffer cache to
111 select file sizes to either get optimum performance from the
112 cache, or to defeat the affect of the buffer cache.
113
114 · Reading/writing of entire disks, to ensure the media capacity
115 and end of media error handling is properly reported by device
116 drivers.
117
118 · Test memory mapped files to compare I/O performance against raw
119 and file system I/O. Typically, memory mapped I/O approaches the
120 raw device performance.
121
122 · Testing I/O to files on NFS mounted file systems. This will give
123 you a good indication of your ethernet performance to remote
124 files.
125
126 · Writing/reading pipes & FIFO's to verify pipe operation and per‐
127 formance.
128
129 · Initiating multiple processes to test optimizations of buffer
130 cache, device drivers, and/or intelligent controllers. This is
131 also useful to test multiple device access and for loading the
132 I/O sub-system.
133
134 · Force I/O at different memory boundaries to test low level
135 driver handling. Using the align option, you can set memory
136 alignment for testing specialized device driver DMA code. This
137 is very useful when developing new I/O sub-systems.
138
139 · Do loopback testing of parallel or serial lines on either the
140 same system of different systems. This is a useful compatibility
141 test when running different machines running different operating
142 systems.
143
144 · Enable POSIX Asynchronous I/O to verify proper operation of this
145 API and to determine performance gains (over standard synchro‐
146 nous I/O). This is also useful for queuing multiple I/O requests
147 to drivers and for testing SCSI tag queuing and RAID configura‐
148 tions.
149
150 · Specify variable record options for testing variable tape
151 devices.
152
153 · On Tru64 cluster systems, distributed lock manager (DLM) options
154 can be used to control access to shared devices or files.
155
156 · Also available on Tru64 UNIX is the ability to use Extended
157 Error Information (EEI) to detect and recover from SCSI
158 bus/device resets (tape is repositioned for continuing the
159 test).
160
161 · Monitor slow or no I/O progress.
162
163 · Execute a trigger when failures occur.
164
165
167 This section describes program options and and special notes related to
168 each. The dt help file provides a summary of the options, and the
169 default value of most options.
170
171 Input File if= Option
172 This option specifies the input file to open for reads. The device is
173 opened read-only so devices which only permit or support read access,
174 e.g., parallel input devices, can be opened successfully.
175
176 Special Notes:
177
178 · Data read is automatically verified with the default data pat‐
179 tern, unless you disable this action via the "disable=compare"
180 option.
181
182 · Extra pad bytes of sizeof(int), are allocated at the end of data
183 buffers, initialized with the inverted data pattern, and then
184 verified after each read request to ensure the end of data buf‐
185 fers didn't get overwritten by file system and/or device driv‐
186 ers. This extra check has found problems with flushing DMA
187 FIFO's on several machines.
188
189 Syntax:
190
191 if=filename
192 The input file to read.
193
194
195 Output File of= Option
196 This option specifies the output file to open for writes. After the
197 write portion of the test, the device is closed (to reposition to start
198 of file or to rewind the tape), re-opened, and then a read verification
199 pass is performed. If you wish to prevent the read verify pass, you
200 must specify the "disable=verify" option.
201
202 Special Notes:
203
204 · Terminal devices are closed between passes so previously set
205 terminal characteristics don't get reset. This also caused a
206 race condition when doing loopback testing with two processes.
207
208 · When testing terminal (serial) devices, modem control is dis‐
209 abled (via setting CLOCAL) to prevent tests from hanging. If the
210 "enable=modem" option is specified, then CLOCAL is reset,
211 hangup on close HUPCL is set, and testing will not preceed until
212 carrier or DSR is detected. This code is not fully tested, but
213 this description accurately describes the code.
214
215 · At the present time, tapes are rewound by closing the device, so
216 you must specify the rewind device during testing if the read
217 verify pass is being performed. This restriction will probably
218 change in the next release since magtape control commands will
219 be supported (tape specific tests as well).
220
221 · O_CREAT open flag is cleared to prevent accidently creating
222 files in this directory when not specifying the correct device
223 name (very easy to do when running tests as super-user 'root').
224
225 · When writing to raw disks on Tru64 UNIX, if the disk was previ‐
226 ously labeled, you must issue the "disklabel -z" command to
227 destroy the label block or else you cannot write to this area of
228 this disk (block 0). Failure to do this results in the error
229 "Read-only file system" (errno=EROFS) being returned on write
230 requests.
231
232 Syntax:
233
234 of=filename
235 The output file to write.
236
237
238 Pattern File pf= Option
239 This option specifies a pattern file to use for the data pattern during
240 testing. This option overrides the "pattern=" option and allows you to
241 specify specialized patterns. The only restriction to this option is
242 that the entire file must fit in memory. A buffer is allocated to read
243 the entire pattern file into memory before testing starts so perfor‐
244 mance is not affected by reading the pattern file.
245
246 Syntax:
247
248 pf=filename
249 The data pattern file to use.
250
251
252 Block Size bs= Option
253 This option specifies the block size, in bytes, to use during testing.
254 At the present time, this option sets both the input and output block
255 sizes. At the time I originally wrote this program, I didn't have the
256 need for seperate block sizes, but this may change in a future release
257 where I'll add back the "ibs=" and "obs=" options available with dd.
258
259 Special Notes:
260
261 · When enabling variable length records via the "min=" option,
262 this also sets the maximum record size to be written/read.
263
264 · For memory mapped files, the block size be a multiple of the
265 system dependent page size (normally 4k or 8k bytes).
266
267 Syntax:
268
269 bs=value
270 The block size to read/write.
271
272
273 Log File log[tu]= Options
274 This option specifies the log file to redirect all program output to.
275 This is done by re-opening the standard error stream (stderr) to the
276 specifed log file. Since all output from dt is directed to stderr,
277 library functions such as perror() also write to this log file.
278
279 Special Notes
280
281 · A seperate buffer is allocated for the stderr stream, and this
282 stream is set buffered so timing isn't affected by program out‐
283 put.
284
285 · When starting multiple processes via the "procs=" option, all
286 output is directed to the same log file. The output from each
287 process is identified by the process ID (PID) as part of the
288 message (errors & statistics).
289
290 · logt=filename will truncate the existing log file.
291
292 · logu=filename will create unique log files with multiple pro‐
293 cesses (w/pid).
294
295 Syntax:
296
297 log[tu]=filename
298 The log file name to write.
299
300 Special format keywords are now expanded when part of the log file
301 name, so unique names can be created for each test:
302
303 Log File Format Keywords:
304
305 %iodir The I/O direction.
306
307 %iotype
308 The I/O type.
309
310 %host The host name.
311
312 %pid The process ID.
313
314 %user The user name.
315
316 Example:
317 log=dt_%host_%user_%iodir_%iotype-%pid.log
318
319 Please see the DiskTests.ksh script for examples of using this.
320
321
322 POSIX Asynchronous I/O aios= Option
323 This option enables and controls the number of POSIX Asychronous I/O
324 requests used by the program.
325
326 Special Notes
327
328 · The default is to queue up to 8 requests.
329
330 · The system limit for AIO on Tru64 UNIX is dynamic, and can be
331 queried by using the "sysconfig -q rt" command.
332
333 · You can use the "enable=aio" option to enable AIO and use the
334 default request limit.
335
336 · AIO is only supported for character devices and is disabled for
337 terminals. On Tru64 UNIX, you can alter the Makefile and link
338 against libaio.a, which allows AIO with any device/file by
339 mimic'ing AIO using POSIX threads.
340
341 · AIO requests can be cancelled on Tru64 UNIX, so queuing many
342 requests to 1/2in tape devices will probably result in running
343 off the end of the tape reel. This is not a problem for car‐
344 tridge tapes.
345
346 Syntax:
347
348 aios=value
349 Set number of AIO's to queue.
350
351
352 Keepalive Alarm Time alarm= Option
353 Keepalive Message *keepalive= Options
354 These options control a user defined message that will be emitted dur‐
355 ing the test. The user defines how often to display the keepalive mes‐
356 sage, via the "alarm=time" option, and the format of the message(s),
357 via the "*keepalive=string" options. The normal "keepalive=" option
358 defines the script emitted during the test, while "pkeepalive=" is the
359 per pass message string, and "tkeepalive=" is the totals message string
360 (overriding what dt normally displays). For a full description of the
361 message control strings see the UserGuide.
362
363 Syntax:
364
365 alarm=time
366 The keepalive alarm time.
367
368 keepalive=string
369 The keepalive message string.
370
371 pkeepalive=str
372 The pass keepalive msg string.
373
374 tkeepalive=str
375 The totals keepalive msg string.
376
377 Keepalive Message Format Control
378 The keepalive string is free format like a printf(), with the
379 following format control strings:
380
381 Keepalive Format Control:
382
383 %b The bytes read or written.
384
385 %B Total bytes read and written.
386
387 %c Record count for this pass.
388
389 %C Total records for this test.
390
391 %d The device name.
392
393 %D The real device name.
394
395 %e The number of errors.
396
397 %E The error limit.
398
399 %f The files read or written.
400
401 %F Total files read and written.
402
403 %h The host name.
404
405 %H The full host name.
406
407 %k The kilobytes this pass.
408
409 %K Total kilobytes for this test.
410
411 %l Blocks read or written.
412
413 %L Total blocks read and written.
414
415 %m The megabytes this pass.
416
417 %M Total megabytes for this test.
418
419 %p The pass count.
420
421 %P The pass limit.
422
423 %r Records read this pass.
424
425 %R Total records read this test.
426
427 %s The seconds this pass.
428
429 %S The total seconds this test.
430
431 %t The pass elapsed time.
432
433 %T The total elapsed time.
434
435 %i The I/O mode (read/write)
436
437 %u The user (login) name.
438
439 %w Records written this pass.
440
441 %W Total records written this test.
442
443 Performance Keywords:
444
445 %bps The bytes per second.
446
447 %lbps Logical blocks per second.
448
449 %kbps Kilobytes per second.
450
451 %mbps The megabytes per second.
452
453 %iops The I/O's per second.
454
455 %spio The seconds per I/O.
456
457
458 Lowercase means per pass stats, while uppercase means total
459 stats.
460
461
462 Default:
463 %d Stats: mode %i, blocks %l, %m Mbytes, pass %p/%P, elapsed %t
464
465 or if pass statistics summary is disabled:
466 %d Stats: mode %i, blocks %L, %M Mbytes, pass %p/%P, elapsed %T
467
468 Here's an example used by Hazards' diskdt process:
469 keepalive="count = %C; e = %e; t = %S; IOpS = %IOPS; SpIO = %SPIO"
470 tkeepalive="STAT +RawMbytes %MBPS +RawReads %R +RawWrites %W";
471
472
473 Buffer Alignment align= Option
474 This option controls the alignment of the normally page aligned data
475 buffer allocated. This option is often useful for testing certain DMA
476 boundary conditions not easily reproduced otherwise. The rotate option
477 automatically adjust the data buffer pointer by (0, 1, 2, 3, ...) for
478 each I/O request to ensure various boundaries are fully tested.
479
480 Syntax:
481
482 align=offset
483 Set offset within page aligned buffer.
484
485 align=rotate
486 Rotate data address through sizeof(ptr).
487
488
489 File Disposition dispose= Option
490 This option controls the disposition of test files created on file sys‐
491 tems. By default, the test file created is deleted before exiting, but
492 sometimes you may wish to keep this file for further examination, for
493 use as a pattern file, or simply for the read verify pass of another
494 test (e.g., reading the file via memory map API).
495
496 Syntax:
497
498 dispose=mode
499 Set file dispose to: {delete, keep, or keeponerror}.
500
501
502 Dump Data Limit dlimit= Option
503 This option allows you to specify the dump data limit used when data
504 compare errors occur. The default dump data limit is 64 bytes.
505
506 Syntax:
507
508 dlimit=value
509 Sets the data dump limit to value.
510
511
512 Device Size dsize= Option
513 This option allows you to specify the device block size used. On Tru64
514 Unix, the device block size is obatined automatically by an OS specific
515 IOCTL. For all other systems, random access devices default to 512 byte
516 blocks. You'll likely use this option with C/DVD's, since their default
517 block size to 2048 bytes per block.
518
519 Syntax:
520
521 dsize=value
522 Set the device block (sector) size.
523
524
525 Device Type dtype= Option
526 Input Device Type idtype= Option
527 Output Device Type odtype= Option
528 These options provide a method to inform dt of the type of device test
529 to be performed. Without this knowledge, only generic testing is possi‐
530 ble.
531
532 Special Notes
533
534 · On Tru64 UNIX systems, these options are not necessary, since
535 this information is obtained via the DECIOCGET or DEVGETINFO
536 IOCTL's.
537
538 · Although the program accepts a large number of device types, as
539 shown below, specific tests only exists for "disk", "tape",
540 "fifo", and "terminal" device types. Others may be added in the
541 future.
542
543 · In the case of "disk" device type, reports the relative block
544 number when read, write, or data compare errors occur.
545
546 · Also for "disk" devices, will automatically determine the disk
547 capacity if a data or record limit is not specified. This is
548 done via a series of seek/read requests.
549
550 · On each operating system supported, string compares are done on
551 well known device names to automatically select the device type.
552 For example on QNX, "/dev/hd" for disk, "/dev/tp" for tapes, and
553 "/dev/ser" for serial lines.
554
555 · The device type gets displayed in the total statictics.
556
557 Syntax:
558
559 dtype=string
560 Sets the device type.
561
562 idtype=string
563 Sets the input device type.
564
565 odtype=string
566 Sets the output device type.
567
568 The Valid Device Types Are:
569
570 audio comm disk graphics
571
572 memory mouse network fifo
573
574 pipe printer processor socket
575
576 special streams tape terminal
577
578 unknown
579
580 Note: Although dt does not provide specific test support for each of
581 the devices shown above, its' design makes it easy to add new device
582 specific tests. Specific support exists for disk, fifo, pipe, tape, and
583 terminals. Support for "ptys" may be added in the future as well.
584
585
586 Error Limit errors= Option
587 This option controls the maximum number of errors tolerated before the
588 program exits.
589
590 Special Notes
591
592 · The default error limit is 1.
593
594 · All errors have a time stamp associated with them, which are
595 useful for characterizing intermittent error conditions.
596
597 · The error limit is adjusted for read, write, or data compare
598 failures. This limit is not enforced when flushing data, or for
599 certain AIO wait operations which are considered non-fatal (per‐
600 haps this will change).
601
602 · A future release may support an "onerr=" option to control the
603 action of errors (e.g., loop, ignore (continue), or exit).
604
605 Syntax:
606
607 errors=value
608 The number of errors to tolerate.
609
610
611 File Limit files= Option
612 This option controls the number of tape files to process with tape
613 devices.
614
615 Special Notes
616
617 · During the write pass, a tape file mark is written after each
618 file. After all files are written, 1 or 2 file marks will be
619 written automatically by the tape driver when the device is
620 closed.
621
622 · During reads, each file is expected to be terminated by a file
623 mark and read() system calls are expected to return a value of
624 denoting the end of file. When reading past all tapes files, an
625 errno of ENOSPC is expected to flag the end of media condition.
626
627 · Writing tape file marks is currently not supported on the QNX
628 Operating System. The release I currently have does not support
629 the mtio commands, and unfortunately the POSIX standard does
630 define this interface (the mtio interface appears to be a UNIX
631 specific standard). Multiple tape files can still be read on QNX
632 systems however.
633
634 Syntax:
635
636 files=value
637 Set number of tape files to process.
638
639
640 Terminal Flow Control flow= Option
641 This option specifies the terminal flow control to use during testing.
642
643 Special Notes
644
645 · The default flow control is "xon_xoff".
646
647 · When using XON/XOFF flow control, you must make sure these byte
648 codes (Ctrl/Q = XON = ' 21', Ctrl/S = XOFF = ' 23), since the
649 program does not filter these out automatically. Also be aware
650 of terminal servers (e.g., LAT), or modems (e.g., DF296) which
651 may eat these characters.
652
653 · Some serial lines do support clear-to-send (CTS) or request-to-
654 send (RTS) modem signals. For example on Alpha Flamingo
655 machines, only one port (/dev/tty00) supports full modem con‐
656 trol, while the alternate console port (/dev/tty01) does not.
657 Therefore, if running loopback between both ports, you can not
658 use flow control, the test will hang waiting for these signals
659 to transition (at least, I think this is the case).
660
661 Syntax:
662
663 flow=type
664 Set flow to: none, cts_rts, or xon_xoff.
665
666
667 History history= Option
668 This option sets the number of I/O history entries to record. During
669 failures, the history is dumped, which can be helpful when trou‐
670 bleshooting failures.
671
672 Syntax:
673
674 history=value
675 Set the number of history request entries.
676
677
678 History Data Size hdsize= Option
679 When I/O history is enabled, this option controls how many data bytes
680 are saved for each I/O.
681
682 Syntax:
683 hdsize=value Set the history data size (bytes to save). Default
684 hdsize=32 (set to 0 to disable copy)
685
686
687 Record Increment incr= Option
688 This option controls the bytes incremented when testing variable length
689 records. After each record, this increment value (default 1), is added
690 to the last record size (starting at "min=", up to the maximum record
691 size "max=").
692
693 Special Notes
694
695 · If variable length record testing is enabled on fixed block
696 disks and this option is omitted, then "incr=" defaults to 512
697 bytes.
698
699 Syntax:
700
701 incr=value
702 Set number of record bytes to increment.
703
704 or
705
706 incr=variable
707 Enables variable I/O request sizes.
708
709
710 I/O Direction iodir= Option
711 This option allows you to control the I/O direction with random access
712 devices. The default direction is forward.
713
714 Syntax:
715
716 iodir=direction
717 Set I/O direction to: {forward or reverse}.
718
719
720 I/O Mode iomode= Option
721 This option controls the I/O mode used, either copy, test, or verify
722 modes. The copy option was added to do a byte for byte copy between
723 devices, while skipping bad blocks and keeping file offsets on both
724 disks in sync. I've used this option to (mostly) recover my system disk
725 which developed bad blocks which could not be re-assigned. A verify
726 operation automatically occurs after the copy, which is real handy for
727 unreliable diskettes.
728
729 Syntax:
730
731 iomode=mode
732 Set I/O mode to: {copy, test, or verify}.
733
734
735 IOT Pass iotpass= Option
736 This option is used to specify the IOT pass number. When multiple
737 passes occur, dt factors in the pass count to generate unique data dur‐
738 ing each pass. For example, the IOT seed is normally 0x01010101, and
739 will be multiplied by the pass specified, useful for re-reading previ‐
740 ously written IOT data patterns.
741
742 Syntax:
743
744 iotpass=value
745 Set the IOT pattern for specified pass.
746
747
748 IOT Seed iotseed= Option
749 This option is used to specify the last IOT pattern seed dt used. When
750 multiple passes occur, dt now factors in the pass count to generate
751 unique data during each pass. For example, the IOT seed is normally
752 0x01010101, but this is now multiplied by the pass count for unique‐
753 ness.
754
755 Syntax:
756
757 iotseed=value
758 Set the IOT pattern block seed value.
759
760
761 I/O Type iotype= Option
762 This option controls the type of I/O performed, either random or
763 sequential. The default is to do sequential I/O.
764
765 Special Notes
766
767 · The random number generator used is chosen by defines: RAND48 to
768 select srand48()/lrand48(), RANDOM to select srandom()/random(),
769 and if neither are defined, srand()/rand() gets used by default.
770 Refer to your system literature or manual pages to determine
771 which functions are supported.
772
773 Syntax:
774
775 iotype=type
776 Set I/O type to: {random or sequential}.
777
778 The seeks are limited to the data limited specified or calculated from
779 other options on the dt command line. If data limits are not specified,
780 seeks are limited to the size of existing files, or to the entire media
781 for disk devices (calculated automatically by dt). If the data limits
782 exceed the capacity of the media/partition/file under test, a premature
783 end-of-file will be encountered on reads or writes, but this is treated
784 as a warning (expected), and not as an error.
785
786
787
788 Minimum Record Size min= Option
789 This option controls the minimum record size to start at when testing
790 variable length records.
791
792 Special Notes
793
794 · By default, tests using fixed length records of block size "bs="
795 bytes.
796
797 · This option, in conjuntion with the "max=" and "incr=" control
798 variable length record sizes.
799
800 · If variable length record testing is enabled on fixed block
801 disks and this option is omitted, then "min=" defaults to 512
802 bytes.
803
804 Syntax:
805
806 min=value
807 Set the minumum record size to transfer.
808
809
810 Maxmimum Record Size max= Option
811 The option controls the maximum record size during variable length
812 record testing.
813
814 Special Notes
815
816 · If the "min=" option is specified, and this option is omitted,
817 then the maximum record size is set to the block size "bs=".
818
819 · This option, in conjuntion with the "min=" and "incr=" control
820 variable length record sizes.
821
822 Syntax:
823
824 max=value
825 Set the maximum record size to transfer.
826
827
828 Logical Block Address lba= Option
829 This option sets the starting logical block address used with the
830 "lbdata" option. When specified, the logical block data "enable=lbdata"
831 option is automatically enabled.
832
833 Syntax:
834
835 lba=value Set starting block used w/lbdata option.
836
837 Special Notes
838
839 · Please do not confuse this option with the disks' real logical
840 block address. See 's "seek=" or "position=" options to set the
841 starting file position.
842
843 · Also note that doesn't know about disk partitions, so any posi‐
844 tion specified is relative to the start of the partition used.
845
846
847 Logical Block Size lbs= Option
848 This option sets the starting logical block size used with the lbdata
849 option. When specified, the logical block data (enable=lbdata) option
850 is automatically enabled.
851
852 Syntax:
853
854 lbs=value
855 Set logical block size for lbdata option.
856
857
858 Data Limit limit= Option
859 This option specifies the number of data bytes to transfer during each
860 write and/or read pass for the test.
861
862 Special Notes
863
864 · You must specify either a data limit, record limit, or files
865 limit to initiate a test, unless the device type is "disk", in
866 which case dt will automatically determine the disk capacity.
867
868 · When specifying a runtime via the "runtime=" option, the data
869 limit controls how many bytes to process for each pass (write
870 and/or read pass).
871
872 · If you specify a infinite "limit=inf" value, each pass will con‐
873 tinue until the end of media or file is reached.
874
875 · When the "step=value" option is used, limit controls the maximum
876 offset stepped to.
877
878 Syntax:
879
880 limit=value
881 The number of bytes to transfer.
882
883
884 Munsa (DLM) munsa= Option
885 This option is used on Tru64 Cluster systems to specify various dis‐
886 tributed lock manager (DLM) options with devices or files.
887
888 Syntax:
889
890 munsa=string
891 Set munsa to: cr, cw, pr, pw, ex.
892
893 MUNSA Lock Options:
894
895 cr Concurrent Read (permits read access, cr/pr/cw by others)
896
897 pr Protected Read (permits cr/pr read access to all, no
898 write)
899
900 cw Concurrent Write (permits write and cr access to resource
901 by all)
902
903 pw Protected Write (permits write access, cr by others)
904
905 ex Exclusive Mode (permits read/write access, no access to
906 others)
907
908 For more details, please refer to the dlm(4) reference page.
909
910 Special Notes
911
912 · MUNSA is an obsolete Tru64 Cluster term which meant MUltiple
913 Node Simultaneous Access. The new term is DAIO for Direct Access
914 I/O. Finally, the last term used is DRD for Distributed Request
915 Dispatcher.
916
917
918 Common Open Flags flags= Option
919 Output Open Flags oflags= Option
920 These options are used to specify various POSIX compliant open flags,
921 and system specific flags, to test the affect of these open modes.
922
923 Special Notes
924
925 · Each operating system has different flags, which can be queried
926 by reviewing the help text (dt help).
927
928 Syntax:
929
930 flags=flags
931 Set open flags: {excl,sync,...}.
932
933 oflags=flags
934 Set output flags: {append,trunc,...}.
935
936
937 On Child Error oncerr= Option
938 This option allows you to control the action taken by dt when a child
939 process exits with an error. By default, the action is continue, which
940 allows all child processes to run to completion. If the child error
941 action is set to abort, then dt aborts all child processes if any child
942 process exits with an error status.
943
944 Syntax:
945
946 oncerr={abort|continue}
947 Set child error action.
948
949
950 No Progress Time noprogt= Option
951 This option allows you to specify a time (in seconds) to report when
952 I/O is not making progress. This option is used in conjunction with the
953 "alarm=" option to periodically check for an report when I/O is taking
954 too long. This is especially useful during controller failover type
955 testing.
956
957 Syntax:
958
959 noprogt=value
960 Set the no progress time (in seconds).
961
962
963 No Progress Time Trigger noprogtt= Option
964 This option allows you to specify a time (in seconds) when to initiate
965 the no-progress time trigger script. Note: This option has no effect,
966 unless the noprogt= option is enabled.
967
968 Syntax:
969
970 noprogtt=value
971 Set the no progress time trigger (in seconds).
972
973
974 No Time notime= Option
975 This option allows you to disable timing of certain operations (system
976 calls), when the no-progress options is enabled. Valid optype's are:
977 open close read write ioctl fsync msync aiowait
978
979 Special Notes
980
981 · This option has no effect, unless the option is enabled.
982
983 Syntax:
984
985 notime=optype
986 Disable timing of specified operation type.
987
988
989 Terminal Parity Setting parity= Option
990 This option specifies the terminal parity setting to use during test‐
991 ing.
992
993 Syntax:
994
995 parity=string
996 Set parity to: even, odd, or none.
997
998 parity=string
999 (QNX) Set parity to: even, odd, mark, space, or none.
1000
1001
1002 Pass Limit passes= Option
1003 This option controls the number of passes to perform for each test.
1004
1005 Special Notes
1006
1007 · The default is to perform 1 pass.
1008
1009 · When using the "of=" option, each write/read combination is con‐
1010 sidered a single pass.
1011
1012 · When multiple passes are specified, a different data pattern is
1013 used for each pass, unless the user specified a data pattern or
1014 pattern file. [ Please keep this in mind when using the "dis‐
1015 pose=keep" option, since using this same file for a subsequent
1016 read verify pass, will report comparison errors... I've burnt
1017 myself this way. :-( ]
1018
1019 Syntax:
1020
1021 passes=value
1022 The number of passes to perform.
1023
1024
1025 Data Pattern pattern= Option
1026 This option specifies a 32 bit hexadecimal data pattern to be used for
1027 the data pattern. dt has 12 built-in patterns, which it alternates
1028 through when running multiple passes. The default data patterns are:
1029
1030 0x39c39c39, 0x00ff00ff, 0x0f0f0f0f, 0xc6dec6de, 0x6db6db6d, 0x00000000,
1031 0xffffffff, 0xaaaaaaaa, 0x33333333, 0x26673333, 0x66673326, 0x71c7c71c
1032
1033 You can also specify the special keyword "incr=" to use an incrementing
1034 data pattern, or specify a character string (normally contained within
1035 single or double quotes).
1036
1037 Syntax:
1038
1039 pattern=value
1040 The 32 bit hex data pattern to use.
1041
1042 or
1043
1044 pattern=iot
1045 Use DJ's IOT test pattern.
1046
1047 or
1048
1049 pattern=incr
1050 Use an incrementing data pattern.
1051
1052 or
1053
1054 pattern=string
1055 The string to use for the data pattern.
1056
1057
1058 File Position position= Option
1059 This option specifies a byte offset to seek to prior to starting each
1060 pass of each test.
1061
1062 Syntax:
1063
1064 position=offset
1065 Position to offset before testing.
1066
1067
1068 Prefix prefix= Option
1069 This option allows the user to define a free format prefix string which
1070 is written at the beginning of each block. It is used to generate
1071 uniqueness useful when data corruption occur. Certain format control
1072 strings are interpreted as shown below.
1073
1074 Syntax:
1075
1076 prefix=string
1077 The data pattern prefix string.
1078
1079 The prefix format controls permitted are:
1080
1081 Prefix Format Control:
1082
1083 %d The device name.
1084
1085 %D The real device name.
1086
1087 %h The host name.
1088
1089 %H The full host name.
1090
1091 %p The process ID.
1092
1093 %P The parent PID.
1094
1095 %u = The user name.
1096
1097
1098 Example:
1099 prefix="%u@%h (pid %p)"
1100
1101
1102 Multiple Processes procs= Option
1103 This option specifies the number of processes to initiate performing
1104 the same test. This option allows an easy method for initiating multi‐
1105 ple I/O requests to a single device or file system.
1106
1107 Special Notes
1108
1109 · The per process limit on Tru64 UNIX is 64, and can be queried by
1110 using the "sysconfig -q proc" command.
1111
1112 · Spawning many processes can render your system useless, well at
1113 least very slow, and consumes large amounts of swap space (make
1114 sure you have plenty!).
1115
1116 · The parent process simply monitors (waits for) all child
1117 prcoesses.
1118
1119 · When writing to a file system, the process ID (PID) is appended
1120 to the file name specified with the "of=" option to create
1121 unique file names. If no pattern is specified, each process is
1122 started with a unique data pattern. Subsequent passes cycle
1123 through the 12 internal data patterns. Use "disable=unique" to
1124 avoid this behaviour.
1125
1126 · The spawn() facility, used to execute on a different node, is
1127 not implemented on the QNX Operating System at this time.
1128
1129 Syntax:
1130
1131 procs=value
1132 The number of processes to create.
1133
1134
1135 Set Queue Depth qdepth= Option
1136 This option is currently only implemented on HP-UX. It allow you to set
1137 the queue depth of the device under test, overriding its' default.
1138 Note: The settings is sticky (retained).
1139
1140 Syntax:
1141
1142 qdepth=value
1143 Set the queue depth to specified value.
1144
1145
1146 Random I/O Offset Alignment wralign= Option
1147 This option is used when performing random I/O, to align each random
1148 block offset to a particular alignment, for example 32K.
1149
1150 Syntax:
1151
1152 ralign=value
1153 The random I/O offset alignment.
1154
1155
1156 Random I/O Data Limit rlimit= Option
1157 This option is used with random I/O to specify the number of bytes to
1158 limit random I/O between (starting from block to this range). This
1159 option is independent of the data limit option.
1160
1161 Syntax:
1162
1163 rlimit=value
1164 The random I/O data byte limit.
1165
1166
1167 Random Seed Value rseed= Option
1168 This options sets the seed to initialize the random number generator
1169 with, when doing random I/O. When selecting random I/O, the total sta‐
1170 tistics displays the random seed used during that test. This option can
1171 be used to repeat the random I/O sequence of a test.
1172
1173 Syntax:
1174
1175 rseed=value
1176 The random seed to initialize with.
1177
1178
1179 Record Limit records= Option
1180 This option controls the number of records to process for each write
1181 and/or read pass of each test. The "count=" option is an alias for this
1182 option (supported for dd compatibility).
1183
1184 Special Notes
1185
1186 · You must specify either a data limit, record limit, or files
1187 limit to initiate a test, unless the device type is "disk", in
1188 which case dt will automatically determine the disk capacity.
1189
1190 · When specifying a runtime via the "runtime=" option, the record
1191 limit controls how many records process for each pass (write
1192 and/or read pass).
1193
1194 · If you specify a infinite "records=Inf" value, each pass will
1195 continue until the end of media or file is reached.
1196
1197 Syntax:
1198
1199 records=value
1200 The number of records to process.
1201
1202
1203 Run Time runtime= Option
1204 This option controls how long the total test should run. When used in
1205 conjunction with a data limit or record limit, multiple passes will be
1206 performed until the runtime limit expires. A later section entitled
1207 "Time Input Parameters", describes the shorthand notation for time val‐
1208 ues.
1209
1210 Syntax:
1211
1212 runtime=time
1213 The number of seconds to execute.
1214
1215
1216 Retry Delay retry_delay= Option
1217 This option controls the number of seconds to delay between reads per‐
1218 formed after a data corruption. (see enable=retryDC option)
1219
1220 Syntax:
1221
1222 retry_delay=value
1223 Delay before retrying operation. (Def: 5)
1224
1225
1226 Slice slice= Option
1227 This option is used with random access devices. This option is used in
1228 conjunction with the "slices=value" option, which divides the media
1229 into slices (see below), then "slice=value" defines the slice to do
1230 testing to. Since dt does the calculations, this simplifies simultane‐
1231 ous testing from multiple hosts to shared storage (usually a multi-ini‐
1232 tiator test requrement).
1233
1234 Syntax:
1235
1236 slice=value
1237 The specific disk slice to test.
1238
1239
1240 Slices slices= Option
1241 This option is used with random access devices. This option divides the
1242 media into slices. Each slice contains a different range of blocks to
1243 operate on in a separate process. If no pattern is specified, then each
1244 slice is started with a unique data pattern. Subsequent passes alter‐
1245 nate through dt's 12 internal patterns.
1246
1247 Syntax:
1248
1249 slices=value
1250 The number of disk slices to test.
1251
1252 Note: This option can be used in conjuntion with multiple processes
1253 and/or asynchronous I/O options to generate a heavy I/O load, great for
1254 stress testing!
1255
1256
1257 Record Skip skip= Option
1258 This option specifies the numer of records to skip prior to starting
1259 each write and/or read pass of each test. The skips are accomplished by
1260 reading records.
1261
1262 Syntax:
1263
1264 skip=value
1265 The number of records to skip past.
1266
1267
1268 Record Seek seek= Option
1269 This option specifies the number of records to seek past prior to
1270 starting each write and/or read test. The seeks are accomplished by
1271 lseek()'ing past records, which is much faster than skipping when using
1272 random access devices.
1273
1274 Syntax:
1275
1276 seek=value
1277 The number of records to seek past.
1278
1279
1280 Data Step step= Option
1281 This option is used to specify non-sequential I/O requests to random
1282 access devices. Normally, dt does sequential read & writes, but this
1283 option specifies that step bytes to be seeked past after each request.
1284
1285 Special Notes
1286
1287 · The "limit=value" option can be used to set the maximum offset.
1288
1289 Syntax:
1290
1291 step=value
1292 The number of bytes seeked after I/O.
1293
1294
1295 Terminal Speed speed= Option
1296 This option specifies the terminal speed (baud rate) to setup prior to
1297 initiating the test. Although dt supports all valid baud rates, some
1298 speeds may not be supported by all serial line drivers, and in some
1299 cases, specifying higher speeds may result in hardware errors (e.g.,
1300 silo overflow, framing error, and/or hardware/software overrun errors).
1301 The valid speeds accepted by dt are:
1302
1303 0 50 75 110 134 150
1304
1305 200 300 600 1200 1800 2400
1306
1307 4800 9600 19200 38400 57600 115200
1308
1309 Although a baud rate of zero is accepted, this is done mainly for test‐
1310 ing purposes (some systems use zero to hangup modems). The higher baud
1311 rates are only valid on systems which define the Bxxxxx speeds in
1312 termios.h.
1313
1314 Special Notes
1315
1316 · The default speed is 9600 baud.
1317
1318 Syntax:
1319
1320 speed=value
1321 The tty speed (baud rate) to use.
1322
1323
1324 Terminal Read Timeout timeout= Option
1325 This option specifies the timeout to use, in 10ths of a second, when
1326 testing terminal line interfaces. This is the timeout used between each
1327 character after the first character is received, which may prevent
1328 tests from hanging when a character is garbled and lost.
1329
1330 Special Notes
1331
1332 · The default terminal timeout is 3 seconds.
1333
1334 · The default timeout is automatically adjusted for slow baud
1335 rates.
1336
1337 Syntax:
1338
1339 timeout=value
1340 The tty read timeout in .10 seconds.
1341
1342
1343 Terminal Read Minimum ttymin= Option
1344 This option specifies the minmum number of characers to read, sets the
1345 VMIN tty attribute.
1346
1347 Special Notes
1348
1349 · The tty VMIN field normally gets sets to the value of the block
1350 size ().
1351
1352 · Note that on some systems, the VMIN field is an unsigned char,
1353 so the maximum value is 255.
1354
1355 · On QNX, this field is an unsigned short, so a maximum of 65535
1356 is valid.
1357
1358 Syntax:
1359
1360 ttymin=value
1361 The tty read minimum count (sets vmin).
1362
1363
1364 Trigger Action trigger= Option
1365 This option specifies a trigger action to take whenever an error occurs
1366 and/or when the no-progress time has been exceeded (see
1367 "enable=noprog"). It's main purpose is for triggering an anlyzer and/or
1368 stopping I/O by some means (panic, etc) when trouble-shooting.
1369
1370 Syntax:
1371
1372 trigger=type The trigger to execute during errors.
1373
1374 Trigger Types:
1375
1376 br Execute a bus reset.
1377
1378 bdr Execute a bus device reset.
1379
1380 seek Issue a seek to the failing lba.
1381
1382 cmd:string
1383 Execute command with these args: string dname op dsize
1384 offset position lba errno
1385
1386 The first three options require Scu in your PATH.
1387
1388 When specifying the "cmd:" type, which invokes a program/script, the
1389 following arguments are passed on the command line:
1390 Format: cmd dname op dsize offset position lba errno noprogtime
1391
1392 Where:
1393 dname = The device/file name.
1394 op = open/close/read/write/miscompare/noprog
1395 dsize = The device block size.
1396 offset = The current file offset.
1397 position = The failing offset within block.
1398 lba = The logical block address (relative for FS).
1399 errno = The error number on syscall errors.
1400 noprogtime = The no-progress time (in seconds).
1401
1402
1403
1404 Multiple Volumes volumes= Option
1405 Multi-Volume Records vrecords= Option
1406 These options are used with removal media devices, to define how many
1407 volumes and records on the last volume to process (i.e., tapes, etc).
1408 By using these options, you do not have to guess at a data limit or
1409 record limit, to overflow onto subsequent volumes. These options auto‐
1410 matically sets the "enable=multi" option.
1411
1412 Syntax:
1413
1414 volumes=value
1415 The number of volumes to process.
1416
1417 vrecords=value
1418 The record limit for the last volume.
1419
1420
1421 Enable enable= and Disable disable= Options
1422 These options are used to either enable or disable program flags which
1423 either alter default test modes, test actions, or provide additional
1424 debugging information. You can specify a single flag or multiple flags
1425 each seperated by a comma (e.g., "enable=aio,debug,dump").
1426
1427 Syntax:
1428
1429 enable=flag Enable one or more of the flags below.
1430
1431 disable=flag Disable one or more of the flags below.
1432
1433 The flags which can be enabled or disabled are described below.
1434
1435
1436
1437 POSIX Asynchronous I/O aio Flag
1438 This flag is used to control use of POSIX Asynchronous I/O during test‐
1439 ing, rather than the synchronous I/O read() and write() system calls.
1440
1441 Special Notes
1442
1443 · Beware, you may need to rebuild on new versions of Tru64 Unix
1444 due to POSIX changes and/or AIO library changes between major
1445 releases.
1446
1447 · Reference the "aios=" option, for more special notes.
1448
1449 Flag:
1450
1451 aio POSIX Asynchronous I/O.(Default: disabled)
1452
1453
1454 Reporting Close Errors cerror Flag
1455 This flag controls where close errors are reported as an error or a
1456 failure. When disabled, close errors are reported as a warning. This
1457 flag is meant to be used as a workaround for device drivers which
1458 improperly return failures when closing the device. Many system utili‐
1459 ties ignore close failures, but when testing terminals and tapes, the
1460 close status us very important. For example with tapes, the close
1461 reflects the status of writing filemarks (which also flush buffered
1462 data), and the rewind status.
1463
1464 Flag:
1465
1466 cerrors
1467 Report close errors. (Default: enabled)
1468
1469
1470 Data Comparison compare Flag
1471 This flag disables data verification during the read pass of tests.
1472 This flag should be disabled to read to end of file/media to obtain
1473 maximum capacity statistics, or to obtain maximum performance statis‐
1474 tics (less overhead).
1475
1476 Flag:
1477
1478 compare
1479 Data comparison. (Default: enabled)
1480
1481
1482 Core Dump on Errors coredump Flag
1483 This flag controls whether a core file is generated, via abort(), when
1484 dt is exiting with a failure status code. This is mainly used for pro‐
1485 gram debug, and is not of much interest to normal users. When testing
1486 multiple processes, via fork(), this is useful if your OS debugger does
1487 not support debugging child processes.
1488
1489 Flag:
1490
1491 coredump
1492 Core dump on errors. (Default: disabled)
1493
1494
1495 Diagnostic Logging diag Flag
1496 This option is only valid on Tru64 Unix. When enabled, error messages
1497 get logged to the binary error logger. This is useful to correlate
1498 device error entries with test failures. Please note, the logging only
1499 occurs when running as superuser (API restriction, not mine!).
1500
1501 Flag:
1502
1503 diag Log diagnostic msgs. (Default: disabled)
1504
1505
1506 Debug Output debug Flag
1507 Verbose Debug Output Debug Flag
1508 Random I/O Debug Output rdebug Flag
1509 These flags enable two different levels of debug, which are useful when
1510 trouble-shooting certain problems (i.e., what is dt doing to cause this
1511 failure?). Both flags can be specified for full debug output.
1512
1513 Flag:
1514
1515 debug Debug output. (Default: disabled)
1516
1517 Debug Verbose debug output. (Default: disabled)
1518
1519 edebug End of file debug. (Default: disabled)
1520
1521 rdebug Random debug output. (Default: disabled)
1522
1523 tdebug Timer debug output. (Default: disabled)
1524
1525
1526
1527 Dump Data Buffer dump Flag
1528 This flag controls dumping of the data buffer during data comparision
1529 failures. If a pattern file is being used, then the pattern buffer is
1530 also dumped for easy comparision purposes. To prevent too many bytes
1531 from being dumped, esp. when using large block sizes, dumping is lim‐
1532 ited to 512 bytes of data (was 64, recently increased).
1533
1534 Special Notes
1535
1536 · When the failure occurs within the first 64 bytes of the buffer,
1537 dumping starts at the beginning of the buffer.
1538
1539 · When the failure occurs at some offset within the data buffer,
1540 then dumping starts at (data limit/2) bytes prior to the failing
1541 byte to provide context.
1542
1543 · The start of the failing data is marked by an asterisk '*'.
1544
1545 · You can use the option to override the default dump limit.
1546
1547 · Buffer addresses are displayed for detection of memory boundary
1548 problems.
1549
1550 Flag:
1551
1552 dump Dump data buffer. (Default: enabled)
1553
1554
1555 Tape EEI Reporting eei Flag
1556 This option controls the reporting of Extended Error Information (EEI)
1557 on Tru64 UNIX systems, for tape devices when errors occur. The standard
1558 tape information available from mt is reported, along with the EEI sta‐
1559 tus, CAM status, and SCSI request sense data. This is excellent infor‐
1560 mation to help diagnose tape failures. (thank-you John Meneghini!)
1561
1562 Flag:
1563
1564 eei Tape EEI reporting. (Default: enabled)
1565
1566
1567 Flush Terminal I/O Queues flush Flag
1568 This flag controls whether the terminal I/O queues get flushed before
1569 each test begins. This must be done to ensure no residual characters
1570 are left in the queues from a prior test, or else data verification
1571 errors will be reported. Residual characters may also be left from a
1572 previous XOFF'ed terminal state (output was suspended).
1573
1574 Flag:
1575
1576 flush Flush tty I/O queues. (Default: enabled)
1577
1578
1579 History Dumping hdump Flag
1580 This flag controls dumping the history entries at the end of a test.
1581 Normally dt only dumps the history during errors, but this option when
1582 enabled, dumps the history when exiting. This is useful if you are tim‐
1583 ing I/O's, or wish to see the LBA's I/O went to, etc.
1584
1585 Flag:
1586
1587 hdump History dump. (Default: disabled)
1588
1589
1590 History Timing htiming Flag
1591 This flag controls the timing of history entries. Please be aware, that
1592 enabling timing of each I/O will impact your overall test performance,
1593 as an extra system call is used to obtain system time.
1594
1595 Flag:
1596
1597 htiming
1598 History timing. (Default: disabled)
1599
1600
1601 Log File Header header Flag
1602 When a log file is specified, dt automatically writes the command line
1603 and dt version information at the beginning of the log file. This
1604 option allows you to control whether this header should be written.
1605
1606 Flag:
1607
1608 header Log file header. (Default: enabled)
1609
1610
1611 Loop On Error looponerror Flag
1612 This flag controls lopping on data corruption rereads. This can be
1613 helpful in capturing the failing read request on an analyzer.
1614
1615 Special Notes
1616
1617 · Also see "retry_delay=value" and retryDC flag control.
1618
1619 Flag:
1620
1621 looponerror
1622 Loop on error. (Default: disabled)
1623
1624
1625 Logical Block Data Mode lbdata Flag
1626 This option enables a feature called logical block data mode. This fea‐
1627 ture allows reading/writing of a 4-byte (32-bit) logical block address
1628 at the beginning of each data block tested. The block number is stored
1629 using SCSI byte ordering (big-endian), which matches what the SCSI
1630 Write Same w/lbdata option uses, so dt can verify this pattern, gener‐
1631 ated by scu's "write same" command.
1632
1633 Special Notes
1634
1635 · The starting logical block address defaults to 0, unless over‐
1636 ridden with the "lba=" option.
1637
1638 · The logical block size defaults to 512 bytes, unless overridden
1639 with the "lbs=" option.
1640
1641 · The logical block address is always inserted started at the
1642 beginning of each data block.
1643
1644 · Enabling this feature will degrade performance statistics
1645 (slightly).
1646
1647
1648 Enable Loopback Mode loopback Flag
1649 This flag specifies that either the input or output file should be used
1650 in a loopback mode. In loopback mode, dt forks(), and makes the child
1651 process the reader, while the parent process becomes the writer. In
1652 previous versions of dt, you had to specify both the same input and
1653 output file to enable loopback mode. When specifying this flag, dt
1654 automatically duplicates the input or output device, which is a little
1655 cleaner than the old method (which still works).
1656
1657 Some people may argue that dt should automatically enable loopback mode
1658 when a single terminal or FIFO device is detected. The rationale behind
1659 not doing this is described below:
1660
1661 · You may wish to have another process as reader and/or writer
1662 (which also includes another program, not necessarily ).
1663
1664 · You may wish to perform device loopback between two systems
1665 (e.g., to verify the terminal drivers of two operating systems
1666 are compatible).
1667
1668 · A goal of is to force (hardcode) actions or options to make the
1669 program more flexible. A minimum of validity checking is done to
1670 avoid being too restrictive, although hooks exists to do this.
1671
1672 Special Notes
1673
1674 · The read verify flag is automatically disabled.
1675
1676 · This mode is most useful with terminal devices and/or FIFO's
1677 (named pipes).
1678
1679
1680 Microsecond Delays microdelay Flag
1681 This flag tells dt that delay values, i.e. "sdelay=" and others, should
1682 be executed using microsecond intervals, rather the second intervals.
1683 (thank-you George Bittner for implementing this support!)
1684
1685 Flag:
1686
1687 microdelay
1688 Microsecond delays. (Default: disabled)
1689
1690
1691 Memory Mapped I/O mmap Flag
1692 This flag controls whether the memory mapped API is used for testing.
1693 This test mode is currently supported on SUN/OS, Tru64 UNIX, and Linux
1694 operating systems.
1695
1696 Special Notes
1697
1698 · The block size specified "bs=" be a multiple of the system
1699 dependent page size (normally 4k or 8k).
1700
1701 · An msync() is done after writing and prior to closing to force
1702 modified pages to permanent storage. It may be useful to add an
1703 option to inhibit this action at some point, but my testing was
1704 specifically to time mmap performance. Obviously, invalidating
1705 the memory mapped pages, kind of defeats the purpose of using
1706 memory mapped files in the first place.
1707
1708 · Specifying multiple passes when doing a read verify test, gives
1709 you a good indication of the system paging utilization on suc‐
1710 cessive passes.
1711
1712 · Memory mapping large data files (many megabytes) may exhaust
1713 certain system resources. On an early version of SUN/OS V4.0?, I
1714 could hang my system by gobbling up all of physical memory and
1715 forcing paging (this was certainly a bug which has probably been
1716 corrected since then).
1717
1718 Flag:
1719
1720 mmap Memory mapped I/O. (Default: disabled)
1721
1722
1723 Test Modem Lines modem Flag
1724 This flag controls the testing of terminal modem lines. Normally, dt
1725 disables modem control, via setting CLOCAL, to prevent tests from hang‐
1726 ing. When this flag is enabled, dt enables modem control, via clearing
1727 CLOCAL, and then monitoring the modem signals looking for either car‐
1728 rier detect (CD) or dataset ready (DSR) before allowing the test to
1729 start.
1730
1731 Special Notes
1732
1733 · The program does not contain modem signal monitoring functions
1734 for the all operating systems. The functions in are specific to
1735 Tru64 UNIX and ULTRIX systems, but these can be used as tem‐
1736 plates for other operating systems.
1737
1738 Flag:
1739
1740 modem Test modem tty lines. (Default: disabled)
1741
1742
1743 Multiple Volumes multi Flag
1744 This flag controls whether multiple volumes are used during testing.
1745 When this flag is enabled, if the data limit or record count specified
1746 does not fit on the current loaded media, the user is prompted to
1747 insert the next media to continue testing. Although this is used mostly
1748 with tape devices, it can be used with any removeable media.
1749
1750 Flag:
1751
1752 multi Multiple volumes. (Default: disabled)
1753
1754
1755 No I/O Progress noprog Flag
1756 This flag controls whether dt will check for slow or no I/O progress
1757 during testing.
1758
1759 Special Notes Enabling this flag will do nothing by itself. The
1760 "alarm=" option specifies the frequency of how often dt checks for no
1761 progress.
1762
1763 · The "noprogt=secs" option specified the no I/O progress time.
1764
1765 · If "noprogt=" is omitted, it defaults to the "alarm" time value.
1766
1767 · The noprog flag is implicitly enabled by the "noprogt=value"
1768 option.
1769
1770 Flag:
1771
1772 noprog No progress check. (Default: disabled)
1773
1774
1775 Prefill prefill Flag
1776 This flag controls the buffer prefill normally performed prior to
1777 reads. Normally, dt prefills the buffer with the inverted data pattern
1778 (1st four bytes). This, of course, ensures the data is overwritten with
1779 data read, but also imposes overhead not always desirable.
1780
1781 Special Notes
1782
1783 · When IOT pattern is used, this flag is automatically enabled,
1784 since IOT blocks are unique.
1785
1786 Flag:
1787
1788 prefill
1789 Prefill read buffer. (Default: enabled)
1790
1791
1792 Control Per Pass Statistics pstats Flag
1793 This flag controls whether the per pass statistics are displayed. If
1794 this flag is disabled, a single summary line is still displayed per
1795 pass and the total statistics are still displayed in the full format.
1796
1797 Flag:
1798
1799 pstats Per pass statistics. (Default: enabled)
1800
1801
1802 Read After Write raw Flag
1803 This flag controls whether a read-after-write will be performed. Sorry,
1804 raw does not mean character device interface. Normally dt performs a
1805 write pass, followed by a read pass. When this flag is enabled the
1806 read/verify is done immediately after the write.
1807
1808 Flag:
1809
1810 raw Read after write. (Default: disabled)
1811
1812
1813 Tape Reset Handling resets Flag
1814 This option is used during SCSI bus and device reset testing, to repo‐
1815 sition the tape position (tapes rewind on resets), and to continue
1816 testing. This option is only enabled for Tru64 UNIX systems (cur‐
1817 rently), since this option requires reset detection from EEI status,
1818 and tape position information from the CAM tape driver (although dt
1819 also maintains the tape position as a sanity check against the drivers'
1820 data)
1821
1822 Flag:
1823
1824 resets Tape reset handling. (Default: disabled)
1825
1826
1827 Retry Data Corruptions retryDC Flag
1828 This flag controls whether a data corruption retry is performed. A sec‐
1829 ond read is done to re-read the data, with direct I/O for file systems,
1830 and the data is compared against the previous read data, and the
1831 expected data. If the reread data matches the expected data, then dt
1832 assumes a "read failure" occurred, otherwise if the reread data matches
1833 the previous read, dt assumes a "write failure" (the data was written
1834 incorrectly).
1835
1836 Flag:
1837
1838 retryDC
1839 Retry data corruptions.(Default: enabled)
1840
1841
1842 Control Program Statistics stats Flag
1843 This flag controls whether any statistics get displayed (both pass and
1844 total statistics). Disabling this flag also disabled the pass statis‐
1845 tics described above.
1846
1847 Flag:
1848
1849 stats Display statistics. (Default: enabled)
1850
1851
1852 Table(sysinfo) timing table Flag
1853 On Tru64 UNIX systems, this option enables additional timing informa‐
1854 tion which gets reported as part of the statistics display. (thanks to
1855 Jeff Detjen for adding this support!)
1856
1857 Flag:
1858
1859 table Table(sysinfo) timing. (Default: disabled)
1860
1861
1862 System Log syslog Flag
1863 This flag controls logging startup/finish and errors being logged to
1864 the system logger. This can be helpful when correlating dt's errors
1865 with system (driver/file system) error messages.
1866
1867 Flag:
1868
1869 syslog Log errors to syslog. (Default: disabled)
1870
1871
1872 Timestamp Blocks timestamp Flag
1873 This flag controls whether blocks are timestamped when written. The
1874 timestamp is skipped during data comparisions, but is displayed if any
1875 remaining data is incorrect.
1876
1877 Special Notes
1878
1879 · When IOT or lbdata patterns are used, the block number is over‐
1880 written by the timestamp.
1881
1882 · This flag is a stop-gap, until block tagging (w/more informa‐
1883 tion) is implemented.
1884
1885 Flag:
1886
1887 timestamp
1888 Timestamp each block. (Default: disabled)
1889
1890
1891 Unique Pattern unqiue Flag
1892 This flag controls whether multiple process, get a unqiue data pattern.
1893 This affects processes started with the "slices=" or the "procs="
1894 options. This only affects the procs= option when writing to a regular
1895 file.
1896
1897 Flag:
1898
1899 unique Unique pattern. (Default: enabled)
1900
1901
1902 Verbose Output verbose Flag
1903 This flag controls certain informational program messages such as read‐
1904 ing and writing partial records. If you find these messages undesir‐
1905 able, then they can be turned off by disabling this flag.
1906
1907 But beware, partial reads or writes of disk records if not at EOF is
1908 usually a problem!
1909
1910 Flag:
1911
1912 verbose
1913 Verbose output. (Default: enabled)
1914
1915
1916 Verify Data verify Flag
1917 This flag controls whether the read verify pass is performed automati‐
1918 cally after the write pass. Ordinarily, when specifying an output
1919 device via the "of=" option, a read verify pass is done to read and
1920 perform a data comparision. If you only wish to write the data, and
1921 omit the data verification read pass, then di able this flag.
1922
1923 Flag:
1924
1925 verify Verify data written. (Default: enabled)
1926
1927
1928 Special Notes
1929
1930 · If you don't plan to ever read the data being written, perhaps
1931 for performance reasons, specifying "disable=compare" prevents
1932 the data buffer from being initialized with a data pattern.
1933
1934 · This verify option has no affect when reading a device. You must
1935 disable data comparsions via "disable=compare".
1936
1937
1938 Program Delays
1939 dt allows you to specify various delays to use at certain points of the
1940 test. These delays are useful to slow down I/O requests or to prevent
1941 race conditions when testing terminals devices with multiple processes,
1942 or are useful for low level driver debugging. All delay values are in
1943 seconds, unless you specify "enable=microdelay", to enable micro-second
1944 delays.
1945
1946
1947 Close File cdelay= Delay
1948 This delay, when enabled, is performed prior to closing a file descrip‐
1949 tor.
1950
1951 Delay
1952
1953 cdelay=value
1954 Delay before closing the file. (Def: 0)
1955
1956
1957 End of Test edelay= Delay
1958 This delay, when enabled, is used to delay after closing a device, but
1959 prior to re-opening the device between multiple passes.
1960
1961 Delay:
1962
1963 edelay=value
1964 Delay between multiple passes. (Def: 0)
1965
1966
1967 Read Record rdelay= Delay
1968 This delay, when enabled, is used prior to issuing each read request
1969 (both synchronous read()'s and asynchronous aio_read()'s).
1970
1971 Delay:
1972
1973 rdelay=value
1974 Delay before reading each record. (Def: 0)
1975
1976
1977 Start Test sdelay= Delay
1978 This delay, when enabled, is used prior to starting the test. When
1979 testing terminal devices, when not in self loopback mode, the writing
1980 process (the parent) automatically delays 1 second, to allow the read‐
1981 ing process (the child) to startup and setup its' terminal characteris‐
1982 tics. If this delay did not occur prior to the first write, the reader
1983 may not have its' terminal characteristics (flow, parity, & speed) set‐
1984 up yet, and may inadvertantly flush the writers data or receive garbled
1985 data.
1986
1987 Delay:
1988
1989 sdelay=value
1990 Delay before starting the test. (Def: 0)
1991
1992
1993 Child Terminate tdelay= Delay
1994 This delay is used by child processes before exiting, to give the par‐
1995 ent process sufficient time to cleanup and wait for the child. This is
1996 necessary since if the child exits first, a SIGCHLD signal may force
1997 the parent to it's termination signal handler before it's ready to.
1998 This is a very simplistic approach to prevent this parent/child race
1999 condition and is only currently used by the child for terminal loopback
2000 testing.
2001
2002 Delay:
2003
2004 tdelay=value
2005 Delay before child terminates. (Def: 1)
2006
2007
2008 Write Record wdelay= Delay
2009 This delay, when enabled, is used prior to issuing each write request
2010 (both synchronous write()'s and asynchronous aio_write()'s).
2011
2012 Delay:
2013
2014 wdelay=value
2015 Delay before writing each record. (Def: 0)
2016
2017
2018 Numeric Input Parameters
2019 For any options accepting numeric input, the string entered may contain
2020 any combination of the following characters:
2021
2022 Special Characters:
2023
2024 w words (4 bytes)
2025
2026 q quadwords (8 bytes)
2027
2028 b blocks (512 bytes)
2029
2030 k kilobytes (1024 bytes)
2031
2032 m megabytes (1048576 bytes)
2033
2034 p page size (8192 bytes)
2035
2036 g gigabytes (1073741824 bytes)
2037
2038 t terabytes (1099511627776 bytes)
2039
2040 inf or INF
2041 infinity (18446744073709551615 bytes)
2042
2043
2044 Arithmetic Characters:
2045
2046 + addition
2047
2048 - subtraction
2049
2050 * or x multiplication
2051
2052 / division
2053
2054 % remainder
2055
2056
2057 Bitwise Characters:
2058
2059 ~ complement of value
2060
2061 >> shift bits right
2062
2063 << shift bits left
2064
2065 & bitwise 'and' operation
2066
2067 | bitwise 'or' operation
2068
2069 ^ bitwise exclusive 'or'
2070
2071
2072 The default base for numeric input is decimal, but you can override
2073 this default by specifying 0x or 0X for hexadecimal coversions, or a
2074 leading zero '0' for octal conversions.
2075
2076 NOTE: Certain values will vary depending on the operating system and/or
2077 machine you are running on. For example, the page size is system depen‐
2078 dent, and the value for Infinity is the largest value that will fit
2079 into an unsigned long long (value shown above is for 64-bit systems),
2080 or double for systems which don't support "long long".)
2081
2082
2083 Time Input Parameters
2084 When specifying the run time "runtime=" option, the time string entered
2085 may contain any combination of the following characters:
2086
2087 Time Input:
2088
2089 d days (86400 seconds)
2090
2091 h hours (3600 seconds)
2092
2093 m minutes (60 seconds)
2094
2095 s seconds (the default)
2096
2097
2098 Arithmetic characters are permitted, and implicit addition is performed
2099 on strings of the form '1d5h10m30s'.
2100
2101
2102
2104 Initially dt was written to be a generic test tool, designed to test
2105 any device, and although that was (mostly) accomplished, device spe‐
2106 cific tests needed to be and were developed, based on the device type
2107 detected or specified by the "dtype=" option if not determined automat‐
2108 ically.
2109
2110 Some of the features requested include:
2111
2112 · Support for an initialization file () to setup frequent or com‐
2113 mon test parameters.
2114
2115 · Develop corruption analysis logic. What is this? Folks familiar
2116 with HP's Hazard know how valuable this is: data re-read logic,
2117 I/O history, metadata prowlers, and detailed analysis of
2118 expected and received data. A lot of work is involved here,
2119 especially with file system prowlers, which are responsible for
2120 converting file system data structures to physical underlying
2121 LBA's, to help identify bad data in analyzer traces.
2122
2123 · Improved file system testing. Although not developed as a file
2124 system exerciser, many folks use it this way. Multiple processes
2125 creating unique data files generates a data load, but many file
2126 system specific features, such as truncating files, file lock‐
2127 ing, creating lots of metadata (via subdirectories), and many
2128 more are not tested well. Major effort here!
2129
2130 · Supporting multiple devices in one invocation (perhaps a comma
2131 separated list). Although multiple processes or threads could
2132 accomplish this, it does add complexity requiring locking and
2133 switching to reentrant library API's, and the savings is shared
2134 code is minimal (I think) since most of the address space is
2135 data buffers.
2136
2137 · Multiple threads for I/O is likely to be implemented one day.
2138 The reason I haven't rushed this I/O method, is because POSIX
2139 AIO provides my need, and most modern day OS's now support POSIX
2140 AIO. Interestingly enough, the Linux AIO is implemented via
2141 POSIX threads! Threads are interesting to overcome OS's with a
2142 process limit, and threads (should) reduce system resources.
2143
2144 · Incorporate SCSI library to implement bus/target/lun reset trig‐
2145 gers, etc.
2146
2147 · Interactive interface to keep the device open, like does, to
2148 allow more creative tests, especially for tapes and tape
2149 libraries (although most use for disk testing).
2150
2151 · Add output formats to allow statistics to be imported to tools
2152 such as MS Excel, etc.
2153
2154 · GUI front-end? Might be nice, but not necessary for test automa‐
2155 tion. Volunteers?
2156
2157 · Port to VMS? There's a need, so given the time, this will likely
2158 happen.
2159
2160 · Native Windows? Mostly there, thanks to the HP Hazard India
2161 team, but unfortuanatly I no longer have a Windows development
2162 environment, so I cannot supply updates. The code needs a few
2163 tweaks for file system testing, ported for raw I/O testing ini‐
2164 tially.
2165
2166 · iozone supplies many of the features above, so you may wish to
2167 consider this tool too. It's difficult, if not impossible, to
2168 supply sufficient features for everyones test needs!
2169
2170
2172 I'm happy to report that is getting wide spread use all over the world!
2173 Storage groups, terminal/lat groups, Q/A, developers, and other periph‐
2174 eral qualification groups are using as part of their testing. I guess
2175 maybe this will be my (computer) legacy?
2176
2177 Anyways, I hope you find as useful as I have. This is usually one of
2178 the first tools I port to a new operating system, since it's an excel‐
2179 lent diagnostic and performance tool (it gives me a warm and fuzzy
2180 feeling ).
2181
2182
2184 Written by Robin Miller <Robin.T.Miller@gmail.com>
2185
2186
2187
2188
2189
2190dt version 16.20 27 Jul 2009 dt(1)