diff options
author | Patrick Simianer <p@simianer.de> | 2016-05-24 11:54:56 +0200 |
---|---|---|
committer | Patrick Simianer <p@simianer.de> | 2016-05-24 11:54:56 +0200 |
commit | a8dd54dbad2d4f43b22aa7a638b6f5314436692f (patch) | |
tree | 9df548bf04e35ff397471e3e5d247d807e6b1d21 /disk-benchmark | |
parent | ac0f614b8fc4ae6bfd331dde158f349ae3c99660 (diff) |
disk-benchmark: slightly nicer output
Diffstat (limited to 'disk-benchmark')
-rwxr-xr-x | disk-benchmark | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/disk-benchmark b/disk-benchmark index 77475cf..5f9ab42 100755 --- a/disk-benchmark +++ b/disk-benchmark @@ -1,19 +1,25 @@ #!/bin/sh -for i in {0..4}; do -echo echo "WRITE SPEED" -dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc +for i in {0..2}; do + A=$(dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasync,notrunc 2>&1 | tail -1 | cut -d " " -f 8-) + echo $A +done echo echo "READ SPEED" -echo 3 > /proc/sys/vm/drop_caches -dd if=tempfile of=/dev/null bs=1M count=1024 +for i in {0..2}; do + echo 3 > /proc/sys/vm/drop_caches + A=$(dd if=tempfile of=/dev/null bs=1M count=1024 2>&1 | tail -1 | cut -d " " -f 8-) + echo $A +done echo echo "BUFFERED READ SPEED" -dd if=tempfile of=/dev/null bs=1M count=1024 +for i in {0..2}; do + A=$(dd if=tempfile of=/dev/null bs=1M count=1024 2>&1 | tail -1 | cut -d " " -f 8-) + echo $A +done rm tempfile -done |