#!/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}"