diff options
author | Telyn <telyn@telynz.uk> | 2018-01-31 11:30:50 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-31 11:30:50 +0000 |
commit | 9ef70ed3d53e11dacc5d4df4478d5ff452a2dd6d (patch) | |
tree | ace44f0ea0a81d7d369df74c3d95c219905e7fa6 /heartbeat_hammer.sh | |
parent | 0be1fa0ebadf9435a760582d17f47ff96dc0851c (diff) | |
parent | 9af0d1761552601db30de7a991d90d64ec6c88f5 (diff) |
Release to master
Diffstat (limited to 'heartbeat_hammer.sh')
-rw-r--r-- | heartbeat_hammer.sh | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/heartbeat_hammer.sh b/heartbeat_hammer.sh deleted file mode 100644 index 12b74bc..0000000 --- a/heartbeat_hammer.sh +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/bash - -PRE="ruby -I lib bin/mauvesend [::1]" -F=60 -S=10 -n=$* - -_host () { - hostname="imaginary-$i.example.com" - down="n" - - while( true ) ; do - - 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*$S/32768 - $S)) - else - sleep $((RANDOM*$S/32768 + $F + $S)) - fi - - if [ $RANDOM -gt 30000 ] ; then - [ "$down" == "n" ] && echo "Host $hostname down" - down="y" - else - [ "$down" == "y" ] && echo "Host $hostname up" - down="n" - fi - done -} - -echo -e "This command will go beserk. To kill run\n pkill -t `tty`\n\nGiving you 5 seconds to quit!" - -sleep 5 - -for i in `seq 1 100` ; do - _host $i & - sleep 0.2 -done - |