< Bluetooth remote not working in feisty faun - solved
archive
Blair out>

(blog entry)

Saturday 28 April 2007

Benchmark drive speed

#!/bin/bash

path=$1

size=1000

if [ $# -ne 1 ]; then
echo "Usage: `basename $0` "
exit 1
fi

# Make file N MB large, time it to write
t1=`date +%s`
dd if=/dev/zero of=$path count=$(( 1024*1024*$size / 512 )) bs=512 &> /dev/null
t2=`date +%s`

echo -n "Write speed MB/s :"
echo "$size / ($t2 - $t1)" | bc

# Read from file created in previous step, time it to read

t1=`date +%s`
dd if=$path of=/dev/null count=$(( 1024*1024*$size / 512 )) bs=512 &> /dev/null
t2=`date +%s`

echo -n "Read speed MB/s :"
echo "$size / ($t2 - $t1)" | bc

Adam : 9:07 PM

Comments are disabled, I'm tired of cleaning up after spam attacks. If you desperately wish to contribute email me at blog at adamish dot com. Thanks

Or you could use /sbin/hdparm -tT ;)

Dave : Sun 29 Apr 2007
Powered by
Movable Type 4.12