From 0cd93ecedaf30247de7bbe679642819c2d8a51d1 Mon Sep 17 00:00:00 2001 From: Filipp Lepalaan Date: Fri, 26 Feb 2010 17:51:38 +0200 Subject: Some fixes --- hellyeah.command | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/hellyeah.command b/hellyeah.command index 574862a..2b8c692 100755 --- a/hellyeah.command +++ b/hellyeah.command @@ -6,6 +6,7 @@ MYDIR=/private/tmp/_hellyeah CORES=$(sysctl hw.logicalcpu_max | cut -d : -f 2 | sed 's/ //') + for (( i = 0; i < ${CORES}; i++ )); do yes > /dev/null 2>&1 & done @@ -14,12 +15,15 @@ if [[ ! -d "${MYDIR}" ]]; then mkdir "${MYDIR}" fi -while [[ true ]]; do +while true; do for k in 10 100 1000 10000; do BLOCKS=$(($k*1024/512)) - dd if=/dev/random of="${MYDIR}/$(uuidgen)" count=${BLOCKS} + OF="${MYDIR}/$(uuidgen)" + dd if=/dev/random of=${OF} count=${BLOCKS} > /dev/null 2>&1 + sleep 2 + echo "Wrote ${BLOCKS} blocks" + rm -rf "${OF}" done - rm -rf "${MYDIR}/*" done exit 0 -- cgit v1.2.3