Skip to content

Instantly share code, notes, and snippets.

@jordanwesthoff
Created July 14, 2014 15:32
Show Gist options
  • Save jordanwesthoff/b6cb9d5c7dda151d96ab to your computer and use it in GitHub Desktop.
Save jordanwesthoff/b6cb9d5c7dda151d96ab to your computer and use it in GitHub Desktop.
This is a basic gist for testing the disk speed of your system. It writes a pre-specified quantity of MB to the drive and measures the time. Following that, it then reads the same bytes to see how long it takes as well. I got this off of a random forum a long, long time ago and have modified it a bit as the time has passed; it's pretty handy.
#!/bin/bash
# Jordan Westhoff, RIT 2014
read -p "Batch size for test (enter in MB) {1024MB in a GB}" sze
echo "Testing Disk Speed"
echo "$sze MB sample size"
dd if=/dev/zero of=test bs=1048576 count=$sze
dd if=test of=/dev/null bs=1048576
echo "Disk Speed Check Complete"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment