Created
December 25, 2018 06:11
-
-
Save gwsu2008/7a348bcdb67eff0f2f1eb8206062c3c0 to your computer and use it in GitHub Desktop.
ebs_warming.sh
This file contains hidden or 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/" | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment