WizardKit/scripts/outer_scripts_to_review/hw-diags-iobenchmark
2Shirt b368b27faa
New project organization
* Script work is brought into better focus
* New layout will be used to better package the python scripts
* No hidden folders (they will be hidden at build time)
* All building should be done under setup/
  * Avoids ambiguous .bin/.cbin folders at root of project
2019-06-28 18:06:43 -06:00

18 lines
397 B
Bash
Executable file

#!/bin/bash
#
## Wizard Kit: HW Diagnostics - Benchmarks
function usage {
echo "Usage: ${0} device log-file"
echo " e.g. ${0} /dev/sda /tmp/tmp.XXXXXXX/benchmarks.log"
}
# Bail early
if [ ! -b "${1}" ]; then
usage
exit 1
fi
# Run Benchmarks
echo 3 | sudo tee -a /proc/sys/vm/drop_caches >/dev/null 2>&1
sudo dd bs=4M if="${1}" of=/dev/null status=progress 2>&1 | tee -a "${2}"