Skip to content

Instantly share code, notes, and snippets.

@wwoods
Last active December 28, 2015 01:29
Show Gist options
  • Save wwoods/7420435 to your computer and use it in GitHub Desktop.
Save wwoods/7420435 to your computer and use it in GitHub Desktop.
Script to run harddrive tests.
bonnie++ -b > bonnie.out
tail -n 1 bonnie.out | bon_csv2txt > bonnie.txt
tail -n 1 bonnie.out | bon_csv2html > bonnie.html
echo "{ nThreads: 128, w: true, mmf: false, fileSizeMB: 1024 }" | mongoperf > mongoperfWrite.out &
PID=$!
sleep 120
kill -SIGINT $PID
echo "{ nThreads: 128, r: true, mmf: false, fileSizeMb: 1024 }" | mongoperf > mongoperfRead.out &
PID=$!
sleep 120
kill -SIGINT $PID
echo "== Results summary =="
echo "Mongodb write"
tail -n 1 mongoperfWrite.out
echo "Mongodb read"
tail -n 1 mongoperfRead.out
echo "Bonnie++"
cat bonnie.txt
echo "Done."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment