Skip to content

Instantly share code, notes, and snippets.

@stask
Created August 23, 2012 09:19
Show Gist options
  • Save stask/3434545 to your computer and use it in GitHub Desktop.
Save stask/3434545 to your computer and use it in GitHub Desktop.
warm up EBS volume
#!/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