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

📄 dt.examples

📁 Linux磁盘测试的源代码,测试磁盘的读写性能
💻 EXAMPLES
📖 第 1 页 / 共 2 页
字号:
	This file contains various 'dt' examples used to show its'capabilities and to help get new users started.  A short descriptionprefaces each test to describe the nature of the test being performed.Several of the latter tests, are real life problems which were eitheruncovered directly by 'dt', or were easily reproduced using a specific 'dt'command line which helps trouble-shooting problems.	On DEC systems, next to the device name in the total statistics,you'll notice the device name and device type.  This information is obtainedby using the DEC specific DEVIOCGET I/O control command.  This is very foridentifying the device under test, especially since performance and variousproblems are device specific.  For non-Digital systems you'll only see thedevice type displayed, not the real device name, which is setup based on knownsystem dependent device naming conventions (i.e., "/dev/ser" prefix for QNXserial ports).------------------------------------------------------------------------------TEST DESCRIPTION:  This test does read testing of a raw disk partition withdata comparisons disabled, using the POSIX Asynchronous I/O API (AIO is onlysupported on DEC OSF/1 at this time).% dt if=/dev/rrz3c bs=8k limit=50m disable=compare enable=aioTotal Statistics:      Input device/file name: /dev/rrz3c (Device: RZ25, type=disk)           Data pattern read: 0x39c39c39 (data compare disabled)     Total records processed: 6400 @ 8192 bytes/record (8.000 Kbytes)     Total bytes transferred: 52428800 (51200.000 Kbytes, 50.000 Mbytes)      Average transfer rates: 2227853 bytes/sec, 2175.637 Kbytes/sec      Total passes completed: 1/1       Total errors detected: 0/1          Total elapsed time: 00m23.53s           Total system time: 00m01.36s             Total user time: 00m00.20s               Starting time: Wed Sep 15 12:47:55 1993                 Ending time: Wed Sep 15 12:48:18 1993% ------------------------------------------------------------------------------TEST DESCRIPTION:  This test does a write/read verify pass of a 50Mb filethrough the UFS file system, with the file disposition set to "keep", sothe test file is not deleted.  Normally, 'dt' deletes the test filescreated before exiting.% dt of=/usr/tmp/x bs=8k limit=50m dispose=keepWrite Statistics:     Total records processed: 6400 @ 8192 bytes/record (8.000 Kbytes)     Total bytes transferred: 52428800 (51200.000 Kbytes, 50.000 Mbytes)      Average transfer rates: 1530768 bytes/sec, 1494.891 Kbytes/sec      Total passes completed: 0/1       Total errors detected: 0/1          Total elapsed time: 00m34.25s           Total system time: 00m03.48s             Total user time: 00m06.70sRead Statistics:     Total records processed: 6400 @ 8192 bytes/record (8.000 Kbytes)     Total bytes transferred: 52428800 (51200.000 Kbytes, 50.000 Mbytes)      Average transfer rates: 2243743 bytes/sec, 2191.155 Kbytes/sec      Total passes completed: 1/1       Total errors detected: 0/1          Total elapsed time: 00m23.36s           Total system time: 00m02.05s             Total user time: 00m13.95sTotal Statistics:     Output device/file name: /usr/tmp/x   Data pattern read/written: 0x39c39c39     Total records processed: 12800 @ 8192 bytes/record (8.000 Kbytes)     Total bytes transferred: 104857600 (102400.000 Kbytes, 100.000 Mbytes)      Average transfer rates: 1819918 bytes/sec, 1777.264 Kbytes/sec      Total passes completed: 1/1       Total errors detected: 0/1          Total elapsed time: 00m57.61s           Total system time: 00m05.55s             Total user time: 00m20.65s               Starting time: Wed Sep 15 13:42:05 1993                 Ending time: Wed Sep 15 13:43:03 1993% ls -ls /usr/tmp/x51240 -rw-r--r--   1 rmiller  system   52428800 Sep 15 13:42 /usr/tmp/x% od -x < /usr/tmp/x0000000  9c39 39c3 9c39 39c3 9c39 39c3 9c39 39c3*310000000% ------------------------------------------------------------------------------TEST DESCRIPTION:  This test does a read verify pass of the 50Mb filecreated in the previous test, using the memory mapped I/O API (mmap is onlysupported on SUN/OS and DEC OSF/1 at this time).% dt if=/usr/tmp/x bs=8k limit=50m enable=mmapTotal Statistics:      Input device/file name: /usr/tmp/x           Data pattern read: 0x39c39c39     Total records processed: 6400 @ 8192 bytes/record (8.000 Kbytes)     Total bytes transferred: 52428800 (51200.000 Kbytes, 50.000 Mbytes)      Average transfer rates: 2282821 bytes/sec, 2229.318 Kbytes/sec      Total passes completed: 1/1       Total errors detected: 0/1          Total elapsed time: 00m22.96s           Total system time: 00m01.13s             Total user time: 00m07.73s               Starting time: Wed Sep 15 13:49:10 1993                 Ending time: Wed Sep 15 13:49:33 1993% rm /usr/tmp/x------------------------------------------------------------------------------TEST DESCRIPTION:  This test does a write/read verify pass to a QIC-320 1/4"tape drive.  Please notice the total average transfer rate.  This lower rateis caused by the tape rewind performed after writing the tape.  This rewindtime is not included in the write/read times, but is part of the total time.% dt of=/dev/rmt0h bs=64k limit=10mWrite Statistics:     Total records processed: 160 @ 65536 bytes/record (64.000 Kbytes)     Total bytes transferred: 10485760 (10240.000 Kbytes, 10.000 Mbytes)      Average transfer rates: 157365 bytes/sec, 153.677 Kbytes/sec      Total passes completed: 0/1       Total errors detected: 0/1          Total elapsed time: 01m06.63s           Total system time: 00m00.10s             Total user time: 00m01.33sRead Statistics:     Total records processed: 160 @ 65536 bytes/record (64.000 Kbytes)     Total bytes transferred: 10485760 (10240.000 Kbytes, 10.000 Mbytes)      Average transfer rates: 194842 bytes/sec, 190.276 Kbytes/sec      Total passes completed: 1/1       Total errors detected: 0/1          Total elapsed time: 00m53.81s           Total system time: 00m00.08s             Total user time: 00m02.78sTotal Statistics:     Output device/file name: /dev/rmt0h (Device: TZK10, type=tape)   Data pattern read/written: 0x39c39c39     Total records processed: 320 @ 65536 bytes/record (64.000 Kbytes)     Total bytes transferred: 20971520 (20480.000 Kbytes, 20.000 Mbytes)      Average transfer rates: 115950 bytes/sec, 113.233 Kbytes/sec      Total passes completed: 1/1       Total errors detected: 0/1          Total elapsed time: 03m00.86s           Total system time: 00m00.18s             Total user time: 00m04.11s               Starting time: Wed Sep 15 11:50:36 1993                 Ending time: Wed Sep 15 11:53:50 1993% ------------------------------------------------------------------------------TEST DESCRIPTION:  This test does a write/read verify pass of 2 tape filesto a DEC TZ86 tape drive using variable length records ranging from 10 Kbytesto 100 Kbytes using the default increment value of 1 byte.% dt of=/dev/rmt1h min=10k max=100k limit=5m files=2Write Statistics:     Total records processed: 1000 with min=10240, max=102400, incr=1     Total bytes transferred: 10485760 (10240.000 Kbytes, 10.000 Mbytes)      Average transfer rates: 642641 bytes/sec, 627.579 Kbytes/sec      Total passes completed: 0/1       Total files processed: 2/2       Total errors detected: 0/1          Total elapsed time: 00m16.31s           Total system time: 00m00.28s             Total user time: 00m01.26sRead Statistics:     Total records processed: 1000 with min=10240, max=102400, incr=1     Total bytes transferred: 10485760 (10240.000 Kbytes, 10.000 Mbytes)      Average transfer rates: 214725 bytes/sec, 209.693 Kbytes/sec      Total passes completed: 1/1       Total files processed: 2/2       Total errors detected: 0/1          Total elapsed time: 00m48.83s           Total system time: 00m00.45s             Total user time: 00m30.95sTotal Statistics:     Output device/file name: /dev/rmt1h (Device: TZ86, type=tape)   Data pattern read/written: 0x39c39c39     Total records processed: 2000 with min=10240, max=102400, incr=1     Total bytes transferred: 20971520 (20480.000 Kbytes, 20.000 Mbytes)      Average transfer rates: 229322 bytes/sec, 223.948 Kbytes/sec      Total passes completed: 1/1       Total files processed: 4/4       Total errors detected: 0/1          Total elapsed time: 01m31.45s           Total system time: 00m00.75s             Total user time: 00m32.21s               Starting time: Mon Sep 13 15:29:23 1993                 Ending time: Mon Sep 13 15:31:00 1993% ------------------------------------------------------------------------------TEST DESCRIPTION:  This test does writing/reading through a pipe.  Noticethe special character '-' which indicates write standard out/read standard in.% dt of=- bs=8k limit=1g disable=stats | dt if=- bs=8k limit=1gTotal Statistics:      Input device/file name: -           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: 2334644 bytes/sec, 2279.926 Kbytes/sec      Total passes completed: 1/1       Total errors detected: 0/1          Total elapsed time: 07m39.91s           Total system time: 00m17.65s             Total user time: 04m44.66s               Starting time: Wed Sep 15 11:40:08 1993                 Ending time: Wed Sep 15 11:47:48 1993% ------------------------------------------------------------------------------TEST DESCRIPTION:  This test does writing/reading through a fifo (named pipe).This is similar to the previous test, except a fifo file is created, and asingle invocation of 'dt' is used for testing.% mkfifo NamedPipe% ls -ls NamedPipe0 prw-r--r--   1 rmiller  system         0 Sep 16 09:52 NamedPipe% dt of=NamedPipe bs=8k limit=1g enable=loopbackTotal Statistics:     Output device/file name: NamedPipe (device type=fifo)        Data pattern written: 0x39c39c39 (read verify disabled)     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

⌨️ 快捷键说明

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