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

📄 dts

📁 Linux磁盘测试的源代码,测试磁盘的读写性能
💻
字号:
#!/bin/csh#	%Z%%M% %I% %E%##	Date:	August 7, 1990#	Author:	Robin Miller##	Script file to gather disk performance data.## Arguments:#	$1	The data file name.#	$2	The log file name.#	$3	The raw disk device.#	$4	The data file limit.#	$5	The block size(s).#	$6	The pass count.#	$7	Enable debug flag.#set DATA_FILE=$1set LOG_FILE=$2set RAW_DEVICE=$3set DATA_LIMIT=$4set BLOCK_SIZES=$5set PASS_COUNT=$6set DEBUG_FLAG=$7#if ($DATA_FILE == '') then    echo "Usage: dts data_file [ log_file raw_device data_file_limit block_sizes pass_count debug ]";    echo "Example: dts /usr/tmp/dt.data rrz11a.log rrz11a 10m &"    exit 1endifif ($DATA_FILE == '') then	set DATA_FILE=`pwd`/dt.dataendifif ($LOG_FILE == '') then	set LOG_FILE=dts.logendifif ($DATA_LIMIT == '') then	set DATA_LIMIT=50mendifif ($BLOCK_SIZES == '') then	set BLOCK_SIZES="8k 16k 32k 64k 128k"endif## The default is 2 passes to test buffer cache effect.#if ($PASS_COUNT == '') then	set PASS_COUNT=2endif## Setup the debug options:#	Default: dump - dumps buffers on compare errors.#if ($DEBUG_FLAG == 'none') then	set DEBUG_OPTS=""else if ($DEBUG_FLAG == 'debug') then	set DEBUG_OPTS="enable=coredump,debug,dump"else	set DEBUG_OPTS="enable=dump"endif## Test through the Unix file system first.#rm -f $LOG_FILE ; rm -f $DATA_FILEdate > $LOG_FILEecho "" >> $LOG_FILE#df >>& $LOG_FILE#echo "" >> $LOG_FILEforeach bs ($BLOCK_SIZES)    set cmd_line="dt of=$DATA_FILE disable=compare limit=$DATA_LIMIT bs=$bs log=$LOG_FILE passes=$PASS_COUNT $DEBUG_OPTS"    echo $cmd_line >> $LOG_FILE    $cmd_line    set exit_status=$status    if ($exit_status) then	file $DEVICE	echo "" >> $LOG_FILE	date >> $LOG_FILE	echo "" >> $LOG_FILE	exit ($exit_status)    endif    echo "" >> $LOG_FILE    echo "*** End of Test ***" >> $LOG_FILE    echo "" >> $LOG_FILEend## Now test the raw device (entire disk usually).#if ($RAW_DEVICE != '') then    if (`dirname $RAW_DEVICE` != '/dev') then	set RAW_DEVICE=/dev/$RAW_DEVICE    endif    set cmd_line="dt if=$RAW_DEVICE disable=compare limit=5g bs=64k log=$LOG_FILE passes=$PASS_COUNT $DEBUG_OPTS"    echo $cmd_line >> $LOG_FILE    $cmd_line    set exit_status=$statusendifdate >> $LOG_FILE

⌨️ 快捷键说明

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