From d90c406d70fac8063caeeaea6718b9bdd8128643 Mon Sep 17 00:00:00 2001 From: Filipp Lepalaan Date: Fri, 26 Feb 2010 17:36:25 +0200 Subject: Added hellyeah.command --- hellyeah.command | 25 +++++++++++++++++++++++++ poweron.command | 4 ++-- 2 files changed, 27 insertions(+), 2 deletions(-) create mode 100755 hellyeah.command diff --git a/hellyeah.command b/hellyeah.command new file mode 100755 index 0000000..574862a --- /dev/null +++ b/hellyeah.command @@ -0,0 +1,25 @@ +#!/usr/bin/env bash +# hellyeah.command +# Do some stress testings +# @author Filipp Lepalaan + +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 + +if [[ ! -d "${MYDIR}" ]]; then + mkdir "${MYDIR}" +fi + +while [[ true ]]; do + for k in 10 100 1000 10000; do + BLOCKS=$(($k*1024/512)) + dd if=/dev/random of="${MYDIR}/$(uuidgen)" count=${BLOCKS} + done + rm -rf "${MYDIR}/*" +done + +exit 0 diff --git a/poweron.command b/poweron.command index 874b030..3e04120 100755 --- a/poweron.command +++ b/poweron.command @@ -1,11 +1,11 @@ #!/usr/bin/env bash ON_DELAY=20 -OFF_DELAY=70 # this should always be > 60 +OFF_DELAY=120 # this should always be > 60 LOGFILE=~/Desktop/poweron.command.log if [[ $USER != "root" ]]; then - echo "This must be run as root" + echo "This must be run as root" 2>&1 exit 1 fi -- cgit v1.2.3