LinuxɸޥѤHDDǽˡ
ɤ߼ǤhdparmѤѡƥλԤʤ
񤭹߻ǤddѤ1GBΥեǥ쥯ȥ˺ƻԤʤ

Ȥ

ʲѿĶ˹碌ꤹ롣

READTG= ɤ߹߻Ԥʤѡƥ
WRITETG= 񤭹߻Ԥʤǥ쥯ȥ(2GB٤ζɬ)
LOGDIR= ե񤭽Фǥ쥯ȥ

¹ԤȲ̾ΤΥե뤬롣

HDD-Bench_YYYYMMDD-HHMMSS.txt

#!/bin/sh
# ------------------------
#  HDD BenchMarkTest script
# ------------------------
# Version : 1.0
# update  : 2008.05.05

export LANG=C
export PATH=/bin:/sbin:/usr/bin:/usr/sbin:$PATH

# Set

READTG="sda4"
WRITETG="/tmp"
LOGDIR="/home/system/logs"

# LogFileName

LDATE=`date +%Y%m%d-%H%M%S`
HNAME=`hostname`

LOGFILE="HDD-Bench_"$LDATE".txt"
LOG=$LOGDIR/$LOGFILE

# Exec

SDATE=`date +%Y/%m/%d-%H:%M:%S`
cat <<EOF >> $LOG
------------------------
   - HDD BenchMark -
------------------------
System : "$HNAME
Date : "$SDATE 
------------------------
Read Time
------------------------
EOF

for i in [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12];do sleep 10;echo $'\n\n' $i;hdparm -t /dev/$READTG;done >> $LOG

cat <<EOF >> $LOG
------------------------
Write Time
------------------------
EOF

alias rm='rm'
for i in [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12];do sleep 10;echo $'\n\n' $i;date;time dd if=/dev/zero of=$WRITETG/hdparm_write$i.tmp ibs=1M obs=1M count=1024 >> $LOG 2>&1;date;rm -f $WRITETG/hdparm_write$i.tmp;done  >> $LOG

EDATE=`date +%Y/%m/%d-%H:%M:%S`
cat <<EOF >> $LOG
------------------------
 END - $EDATE
------------------------
EOF

exit 0
# EOF


ȥå   Խ ʬ ʎގ̎ ź ʣ ̾ѹ   ǽ   إ   ǽRSS
Last-modified: 2008-05-06 () 19:11:42 (3849d)