Created
August 23, 2012 09:19
-
-
Save stask/3434545 to your computer and use it in GitHub Desktop.
warm up EBS volume
This file contains 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
#!/bin/bash | |
if [ -z "$1" ]; then | |
echo "Usage: sudo $0 /dev/sdh1" | |
exit 1; | |
fi | |
dd if=$1 of=/dev/null & pid=$! | |
while true; do | |
ps -p$pid --no-heading || break; | |
echo "-- $(date) ------------------"; | |
kill -USR1 $pid; | |
sleep 60s; | |
done | |
echo "-- $(date) ------------------"; | |
echo "DONE \o/" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment