aboutsummaryrefslogtreecommitdiff
path: root/heartbeat_hammer.sh
diff options
context:
space:
mode:
authorPatrick J Cherry <patrick@bytemark.co.uk>2011-07-14 18:00:49 +0100
committerPatrick J Cherry <patrick@bytemark.co.uk>2011-07-14 18:00:49 +0100
commit18b0906630ab4165d1e8b4bc66d7446b17c31605 (patch)
tree359b6018b6c7327d3c72c23516cd9378ce01a866 /heartbeat_hammer.sh
parent494b083408b354f38da9b1fc5e8ffb7238d009b3 (diff)
* Improved logging.
* Updated message suppression
Diffstat (limited to 'heartbeat_hammer.sh')
-rw-r--r--heartbeat_hammer.sh7
1 files changed, 4 insertions, 3 deletions
diff --git a/heartbeat_hammer.sh b/heartbeat_hammer.sh
index de530f2..f2d4671 100644
--- a/heartbeat_hammer.sh
+++ b/heartbeat_hammer.sh
@@ -2,6 +2,7 @@
PRE="ruby -I lib bin/mauveclient localhost"
F=60
+S=10
n=$*
_host () {
@@ -12,9 +13,9 @@ _host () {
if [ "$down" == "n" ] ; then
$PRE -o $hostname -i heartbeat -r +$F -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>"
- sleep $((F - $RANDOM*5/32768 - 5))
+ sleep $((F - $RANDOM*$S/32768 - $S))
else
- sleep $((RANDOM*5/32768 + $F + 5))
+ sleep $((RANDOM*$S/32768 + $F + $S))
fi
if [ $RANDOM -gt 30000 ] ; then
@@ -27,7 +28,7 @@ _host () {
done
}
-for i in `seq 1 500` ; do
+for i in `seq 1 100` ; do
_host $i &
sleep 0.2
done