aboutsummaryrefslogtreecommitdiff
path: root/heartbeat_hammer.sh
diff options
context:
space:
mode:
authorPatrick J Cherry <patrick@bytemark.co.uk>2011-06-17 08:59:01 +0100
committerPatrick J Cherry <patrick@bytemark.co.uk>2011-06-17 08:59:01 +0100
commitc50972e379859bffc30f8676192986e28840b107 (patch)
treeb25ccd8647c488c03dbce101ddcd7ec829b8e20d /heartbeat_hammer.sh
parentf6d9144af81f2078567691614fa7831c1a116fdf (diff)
* Updated debian changelog.
* Added jquery library (although it is not used) * Added a hammering script.
Diffstat (limited to 'heartbeat_hammer.sh')
-rw-r--r--heartbeat_hammer.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/heartbeat_hammer.sh b/heartbeat_hammer.sh
new file mode 100644
index 0000000..9b60171
--- /dev/null
+++ b/heartbeat_hammer.sh
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+PRE="ruby -I lib ./bin/mauveclient localhost"
+
+_host () {
+ hostname="imaginary-$i.bytemark.co.uk"
+ while( true ) ; do
+ sleep $((RANDOM/60))
+ echo $hostname
+ $PRE -o $hostname -i heartbeat -r +2m -c now -s "heartbeat failed" --detail="<p>The heartbeat wasn't sent for this host</p><p>This indicates that the host might be down</p>"
+ done
+}
+
+
+for i in `seq 1 50` ; do
+ _host $i &
+done
+