===============================================================================
	Here's an example of 'dt' reading and comparing the first
	100 megabytes of the IOT test disc.
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

linux% dt if=/dev/scd0 bs=32k pattern=iot limit=100m
Total Statistics:
      Input device/file name: /dev/scd0 (device type=disk)
    Data pattern string used: 'IOT Pattern'
     Total records processed: 3200 @ 32768 bytes/record (32.000 Kbytes)
     Total bytes transferred: 104857600 (102400.000 Kbytes, 100.000 Mbytes)
      Average transfer rates: 153137 bytes/sec, 149.548 Kbytes/sec
     Number I/O's per second: 4.673
      Total passes completed: 1/1
       Total errors detected: 0/1
          Total elapsed time: 11m24.73s
           Total system time: 00m00.82s
             Total user time: 00m07.68s
               Starting time: Thu Jul 22 14:52:45 1999
                 Ending time: Thu Jul 22 15:04:10 1999

linux% 

===============================================================================
	Note:  This I/O error was caused by a recoverable error.
	Apparently, the Linux CD-ROM device driver has a bug!
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

linux% dt if=/dev/scd0 bs=32k pattern=iot iotype=random
dt: 'read' - Input/output error
dt: Relative block number where the error occcured is 632252
dt: Error number 1 occurred on Thu Jul 22 14:13:44 1999
Total Statistics:
      Input device/file name: /dev/scd0 (device type=disk)
    Data pattern string used: 'IOT Pattern'
     Total records processed: 1302 @ 32768 bytes/record (32.000 Kbytes)
     Total bytes transferred: 42663936 (41664.000 Kbytes, 40.688 Mbytes)
      Average transfer rates: 51662 bytes/sec, 50.451 Kbytes/sec
     Number I/O's per second: 1.577
      Total passes completed: 0/1
       Total errors detected: 1/1
          Total elapsed time: 13m45.83s
           Total system time: 00m00.28s
             Total user time: 00m03.11s
               Starting time: Thu Jul 22 13:59:55 1999
                 Ending time: Thu Jul 22 14:13:45 1999

linux% 
linux% su kroot
Password: 

# tail /var/log/messages
Jul 22 14:13:44 linux kernel: Current error sr0b:00: sense key Recovered Error 
Jul 22 14:13:44 linux kernel: Additional sense indicates Recovered data with lec
 
Jul 22 14:13:44 linux kernel: CD-ROM I/O error: dev 0b:00, sector 632252 

===============================================================================
	The IOT data pattern can be used with any device/file.
	Here's an example of what the IOT data pattern looks like.
	The logical block address (lba) is placed in the first 4 bytes,
	then each remaining u_int gets (lba += 0x01010101).
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

linux% dt of=- count=1 pattern=iot lba=0x64 disable=stats | od -Ax -tx1
000000 64 00 00 00 65 01 01 01 66 02 02 02 67 03 03 03
000010 68 04 04 04 69 05 05 05 6a 06 06 06 6b 07 07 07
000020 6c 08 08 08 6d 09 09 09 6e 0a 0a 0a 6f 0b 0b 0b
000030 70 0c 0c 0c 71 0d 0d 0d 72 0e 0e 0e 73 0f 0f 0f
000040 74 10 10 10 75 11 11 11 76 12 12 12 77 13 13 13
000050 78 14 14 14 79 15 15 15 7a 16 16 16 7b 17 17 17
000060 7c 18 18 18 7d 19 19 19 7e 1a 1a 1a 7f 1b 1b 1b
000070 80 1c 1c 1c 81 1d 1d 1d 82 1e 1e 1e 83 1f 1f 1f
000080 84 20 20 20 85 21 21 21 86 22 22 22 87 23 23 23
000090 88 24 24 24 89 25 25 25 8a 26 26 26 8b 27 27 27
0000a0 8c 28 28 28 8d 29 29 29 8e 2a 2a 2a 8f 2b 2b 2b
0000b0 90 2c 2c 2c 91 2d 2d 2d 92 2e 2e 2e 93 2f 2f 2f
0000c0 94 30 30 30 95 31 31 31 96 32 32 32 97 33 33 33
0000d0 98 34 34 34 99 35 35 35 9a 36 36 36 9b 37 37 37
0000e0 9c 38 38 38 9d 39 39 39 9e 3a 3a 3a 9f 3b 3b 3b
0000f0 a0 3c 3c 3c a1 3d 3d 3d a2 3e 3e 3e a3 3f 3f 3f
000100 a4 40 40 40 a5 41 41 41 a6 42 42 42 a7 43 43 43
000110 a8 44 44 44 a9 45 45 45 aa 46 46 46 ab 47 47 47
000120 ac 48 48 48 ad 49 49 49 ae 4a 4a 4a af 4b 4b 4b
000130 b0 4c 4c 4c b1 4d 4d 4d b2 4e 4e 4e b3 4f 4f 4f
000140 b4 50 50 50 b5 51 51 51 b6 52 52 52 b7 53 53 53
000150 b8 54 54 54 b9 55 55 55 ba 56 56 56 bb 57 57 57
000160 bc 58 58 58 bd 59 59 59 be 5a 5a 5a bf 5b 5b 5b
000170 c0 5c 5c 5c c1 5d 5d 5d c2 5e 5e 5e c3 5f 5f 5f
000180 c4 60 60 60 c5 61 61 61 c6 62 62 62 c7 63 63 63
000190 c8 64 64 64 c9 65 65 65 ca 66 66 66 cb 67 67 67
0001a0 cc 68 68 68 cd 69 69 69 ce 6a 6a 6a cf 6b 6b 6b
0001b0 d0 6c 6c 6c d1 6d 6d 6d d2 6e 6e 6e d3 6f 6f 6f
0001c0 d4 70 70 70 d5 71 71 71 d6 72 72 72 d7 73 73 73
0001d0 d8 74 74 74 d9 75 75 75 da 76 76 76 db 77 77 77
0001e0 dc 78 78 78 dd 79 79 79 de 7a 7a 7a df 7b 7b 7b
0001f0 e0 7c 7c 7c e1 7d 7d 7d e2 7e 7e 7e e3 7f 7f 7f
000200
linux% 

===============================================================================

linux% dt of=/usr/tmp/iot.data bs=32k limit=25m dispose=keep disable=verify pattern=iot
Total Statistics:
     Output device/file name: /usr/tmp/iot.data
    Data pattern string used: 'IOT Pattern'
     Total records processed: 800 @ 32768 bytes/record (32.000 Kbytes)
     Total bytes transferred: 26214400 (25600.000 Kbytes, 25.000 Mbytes)
      Average transfer rates: 5012314 bytes/sec, 4894.837 Kbytes/sec
     Number I/O's per second: 152.964
      Total passes completed: 1/1
       Total errors detected: 0/1
          Total elapsed time: 00m05.23s
           Total system time: 00m00.55s
             Total user time: 00m00.87s
               Starting time: Thu Jul 22 15:47:23 1999
                 Ending time: Thu Jul 22 15:47:28 1999

linux% ls -ls /usr/tmp/iot.data
25701 -rw-r--r--   1 rmiller  users    26214400 Jul 22 15:47 /usr/tmp/iot.data
linux% cmp /dev/scd0 /usr/tmp/iot.data
cmp: EOF on /usr/tmp/iot.data
linux%