Created
November 2, 2012 12:16
-
-
Save bonifaido/4000986 to your computer and use it in GitHub Desktop.
Benchmark your HDD or SSD read/write speed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
disk-speed() { | |
tstfile=/tmp/tstfile.$RANDOM | |
print "Write speed: " $(dd if=/dev/zero bs=1024k of=$tstfile count=1024 2>&1 | awk '/sec/ {print $1 / $5 / 1048576, "MB/sec" }') | |
purge | |
print " Read speed: " $(dd if=$tstfile bs=1024k of=/dev/null count=1024 2>&1 | awk '/sec/ {print $1 / $5 / 1048576, "MB/sec" }') | |
rm $tstfile | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment