⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dt.examples

📁 Linux磁盘测试的源代码,测试磁盘的读写性能
💻 EXAMPLES
📖 第 1 页 / 共 2 页
字号:
      Total passes completed: 1/1       Total errors detected: 0/1          Total elapsed time: 07m54.18s           Total system time: 00m21.80s             Total user time: 02m14.96s               Starting time: Thu Sep 16 09:42:24 1993                 Ending time: Thu Sep 16 09:50:18 1993Total Statistics:      Input device/file name: NamedPipe (device type=fifo)           Data pattern read: 0x39c39c39     Total records processed: 131072 @ 8192 bytes/record (8.000 Kbytes)     Total bytes transferred: 1073741824 (1048576.000 Kbytes, 1024.000 Mbytes)      Average transfer rates: 2264402 bytes/sec, 2211.330 Kbytes/sec      Total passes completed: 1/1       Total errors detected: 0/1          Total elapsed time: 07m54.18s           Total system time: 00m19.90s             Total user time: 04m44.01s               Starting time: Thu Sep 16 09:42:24 1993                 Ending time: Thu Sep 16 09:50:19 1993% rm NamedPipe% ------------------------------------------------------------------------------TEST DESCRIPTION:  This test performs a loopback test between two seriallines.  Debug was enabled to display additional test information, which isuseful if serial line testing hangs. 'dt' does not use a watchdog timer.Also notice the number of bytes allocated was 68, not 64 as 'bs='indicates.  Pad bytes are allocated at the end of data buffers andchecked after reads to ensure drivers/file system code do not writetoo many bytes (this has uncovered DMA FIFO flush problems in devicedrivers in the past).% dt if=/dev/tty00 of=/dev/tty01 bs=64 limit=100k flow=xon_xoff parity=none speed=38400 enable=debugdt: Attempting to open input file '/dev/tty00', mode = 00...dt: Input file '/dev/tty00' successfully opened, fd = 3dt: Saving current terminal characteristics, fd = 3...dt: Setting up test terminal characteristics, fd = 3...dt: Attempting to open output file '/dev/tty01', mode = 01...dt: Output file '/dev/tty01' successfully opened, fd = 4dt: Saving current terminal characteristics, fd = 4...dt: Setting up test terminal characteristics, fd = 4...dt: Parent PID = 1809, Child PID = 1810dt: Allocated buffer at address 0x4a000 of 68 bytes, using offset 0dt: Allocated buffer at address 0x4a000 of 68 bytes, using offset 0dt: Characters remaining in output queue = 304dt: Waiting for output queue to drain...dt: Output queue finished draining...Total Statistics:     Output device/file name: /dev/tty01 (device type=terminal)    Terminal characteristics: flow=xon_xoff, parity=none, speed=38400        Data pattern written: 0x39c39c39 (read verify disabled)     Total records processed: 1600 @ 64 bytes/record (0.063 Kbytes)     Total bytes transferred: 102400 (100.000 Kbytes, 0.098 Mbytes)      Average transfer rates: 3840 bytes/sec, 3.750 Kbytes/sec      Total passes completed: 1/1       Total errors detected: 0/1          Total elapsed time: 00m26.66s           Total system time: 00m00.06s             Total user time: 00m00.01s               Starting time: Wed Sep 15 11:37:39 1993                 Ending time: Wed Sep 15 11:38:07 1993Total Statistics:      Input device/file name: /dev/tty00 (device type=terminal)    Terminal characteristics: flow=xon_xoff, parity=none, speed=38400           Data pattern read: 0x39c39c39     Total records processed: 1600 @ 64 bytes/record (0.063 Kbytes)     Total bytes transferred: 102400 (100.000 Kbytes, 0.098 Mbytes)      Average transfer rates: 3703 bytes/sec, 3.617 Kbytes/sec      Total passes completed: 1/1       Total errors detected: 0/1          Total elapsed time: 00m27.65s           Total system time: 00m00.28s             Total user time: 00m00.05s               Starting time: Wed Sep 15 11:37:39 1993                 Ending time: Wed Sep 15 11:38:07 1993dt: Restoring saved terminal characteristics, fd = 3...dt: Closing file '/dev/tty00', fd = 3...dt: Waiting for child PID 1810 to exit...dt: Child PID 1810, exited with status = 0dt: Restoring saved terminal characteristics, fd = 4...dt: Closing file '/dev/tty01', fd = 4...% ------------------------------------------------------------------------------TEST DESCRIPTION:  This test does write/reads testing to a raw devicestarting 2 processes each of which will execute 2 passes.  Notice adifferent pattern gets used for each pass.  There are 12 differentpatterns built into the program which get cycled through which get cycledthrough when multiple passes are performed.% dt of=/dev/rrz11a bs=64k limit=5m procs=2 passes=2Write Statistics (1797):        Data pattern written: 0x39c39c39     Total records processed: 80 @ 65536 bytes/record (64.000 Kbytes)     Total bytes transferred: 5242880 (5120.000 Kbytes, 5.000 Mbytes)      Average transfer rates: 598047 bytes/sec, 584.030 Kbytes/sec      Total passes completed: 0/2       Total errors detected: 0/1          Total elapsed time: 00m08.76s           Total system time: 00m00.05s             Total user time: 00m00.65sWrite Statistics (1796):        Data pattern written: 0x39c39c39     Total records processed: 80 @ 65536 bytes/record (64.000 Kbytes)     Total bytes transferred: 5242880 (5120.000 Kbytes, 5.000 Mbytes)      Average transfer rates: 600330 bytes/sec, 586.260 Kbytes/sec      Total passes completed: 0/2       Total errors detected: 0/1          Total elapsed time: 00m08.73s           Total system time: 00m00.05s             Total user time: 00m00.66sRead Statistics (1797):           Data pattern read: 0x39c39c39     Total records processed: 80 @ 65536 bytes/record (64.000 Kbytes)     Total bytes transferred: 5242880 (5120.000 Kbytes, 5.000 Mbytes)      Average transfer rates: 534079 bytes/sec, 521.562 Kbytes/sec      Total passes completed: 1/2       Total errors detected: 0/1          Total elapsed time: 00m09.81s           Total system time: 00m00.06s             Total user time: 00m01.38sRead Statistics (1796):           Data pattern read: 0x39c39c39     Total records processed: 80 @ 65536 bytes/record (64.000 Kbytes)     Total bytes transferred: 5242880 (5120.000 Kbytes, 5.000 Mbytes)      Average transfer rates: 534988 bytes/sec, 522.449 Kbytes/sec      Total passes completed: 1/2       Total errors detected: 0/1          Total elapsed time: 00m09.80s           Total system time: 00m00.05s             Total user time: 00m01.40s	.	.	.Total Statistics (1797):     Output device/file name: /dev/rrz11a (Device: RZ56, type=disk)   Data pattern read/written: 0x00ff00ff     Total records processed: 320 @ 65536 bytes/record (64.000 Kbytes)     Total bytes transferred: 20971520 (20480.000 Kbytes, 20.000 Mbytes)      Average transfer rates: 562239 bytes/sec, 549.062 Kbytes/sec      Total passes completed: 2/2       Total errors detected: 0/1          Total elapsed time: 00m37.30s           Total system time: 00m00.23s             Total user time: 00m04.10s               Starting time: Wed Sep 15 11:32:45 1993                 Ending time: Wed Sep 15 11:33:22 1993Total Statistics (1796):     Output device/file name: /dev/rrz11a (Device: RZ56, type=disk)   Data pattern read/written: 0x00ff00ff     Total records processed: 320 @ 65536 bytes/record (64.000 Kbytes)     Total bytes transferred: 20971520 (20480.000 Kbytes, 20.000 Mbytes)      Average transfer rates: 562490 bytes/sec, 549.307 Kbytes/sec      Total passes completed: 2/2       Total errors detected: 0/1          Total elapsed time: 00m37.28s           Total system time: 00m00.25s             Total user time: 00m04.13s               Starting time: Wed Sep 15 11:32:45 1993                 Ending time: Wed Sep 15 11:33:22 1993% ------------------------------------------------------------------------------TEST DESCRIPTION:  This test attempts to write to a DEC OSF/1 raw diskwhich contains a valid label block, and the action necessary to destroythis label block before writes are possible.  As you can see, the firstdisk block (block 0) is write protected (all other blocks are not however).Since many people, including myself, have been burned (mis-lead) by thiswonderful feature, I thought it was worth documenting here.# file /dev/rrz11c/dev/rrz11c:	character special (8/19458) SCSI #1 RZ56 disk #88 (SCSI ID #3) # disklabel -r -w /dev/rrz11c rz56# ls -ls /dev/rrz11a0 crw-rw-rw-   1 root     system     8,19456 Sep 15 11:33 /dev/rrz11a# dt of=/dev/rrz11c bs=64k limit=1m disable=statsdt: 'write' - Read-only file systemdt: Error number 1 occurred on Thu Sep 16 10:53:54 1993# dt of=/dev/rrz11a position=1b bs=64k limit=1m disable=stats# disklabel -z /dev/rrz11c# dt of=/dev/rrz11c bs=64k limit=1m disable=stats#------------------------------------------------------------------------------TEST DESCRIPTION:  This test shows a real life problem discovered on aDEC 3000-500 (Flamingo) system using DEC OSF/1 V1.3.  This test uncoversa data corruption problem that occurs at the end of data buffers on readrequests.  The problem results from the FIFO being improperly flushed whenDMA transfers abort on certain boundaries (residual bytes left in FIFO).This failure is uncovered by performing large reads of short records andverifying the pad bytes, allocated at the end of data buffers, do *not*get inadvertantly overwritten.  This example also illustrates the formatof dumped data buffers (when enabled via the "enable=dump" option).% dt of=/dev/rmt0h min=1k max=25k incr=p-1 limit=1m disable=stats,verify% dt if=/dev/rmt0h min=1k+25 max=25k incr=p-1 limit=1m disable=statsdt: WARNING: Record #1, attempted to read 1049 bytes, read only 1024 bytes.dt: WARNING: Record #2, attempted to read 9240 bytes, read only 9215 bytes.dt: Data compare error at pad byte 0 in record number 2dt: Data expected = 0xc6, data found = 0xffdt: Error number 1 occurred on Sat Sep 18 11:15:08 1993% dt if=/dev/rmt0h min=1k+25 max=25k incr=p-1 limit=1m disable=stats enable=dumpdt: WARNING: Record #1, attempted to read 1049 bytes, read only 1024 bytes.dt: WARNING: Record #2, attempted to read 9240 bytes, read only 9215 bytes.dt: Data compare error at pad byte 0 in record number 2dt: Data expected = 0xc6, data found = 0xffdt: Data buffer pointer = 0x3e3ff, buffer offset = 9215Dumping Buffer (base = 0x3c000, offset = 9215, size = 9219 bytes):0x3e3df  39 39 9c c3 39 39 9c c3 39 39 9c c3 39 39 9c c30x3e3ef  39 39 9c c3 39 39 9c c3 39 39 9c c3 39 39 9c c30x3e3ff  ff c6 63 3c c6 c6 63 3c c6 c6 63 3c c6 c6 63 3c0x3e40f  c6 c6 63 3c c6 c6 63 3c c6 c6 63 3c c6 c6 63 3cdt: Error number 1 occurred on Sat Sep 18 11:15:31 1993% echo $status-1% 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -