aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFilipp Lepalaan <filipp@mac.com>2010-02-26 17:36:25 +0200
committerFilipp Lepalaan <filipp@mac.com>2010-02-26 17:36:25 +0200
commitd90c406d70fac8063caeeaea6718b9bdd8128643 (patch)
treece3929b203e86e0fe15a99ae40123684f996ec95
parent480ee414ed34ca6ccf5128d8986ab82dbc0e34b2 (diff)
downloadmtk-d90c406d70fac8063caeeaea6718b9bdd8128643.tar.gz
mtk-d90c406d70fac8063caeeaea6718b9bdd8128643.tar.bz2
mtk-d90c406d70fac8063caeeaea6718b9bdd8128643.zip
Added hellyeah.command
-rwxr-xr-xhellyeah.command25
-rwxr-xr-xpoweron.command4
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