diff options
-rwxr-xr-x | hellyeah.command | 25 | ||||
-rwxr-xr-x | poweron.command | 4 |
2 files changed, 27 insertions, 2 deletions
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 <filipp@mcare.fi> + +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 |