Skip to content

Instantly share code, notes, and snippets.

Last active December 4, 2022 00:17
  • Star 1 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
raspberry pi disk speed script
# Tests Raspberry Pi disk read/write speed
if [ "$EUID" -ne 0 ]
then echo "Please run as root"
echo "=== Performing Write Speed Test ==="
dd if=/dev/zero of=/tmp/test.tmp bs=500K count=1024 oflag=dsync
sync; echo 3 | tee /proc/sys/vm/drop_caches
echo "=== Performing Read Speed Test ==="
dd if=/tmp/test.tmp of=/dev/null bs=500K count=1024
rm -rf /tmp/test.tmp
echo "=== Speed Test Complete ==="
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment