Created
August 18, 2017 15:07
-
-
Save mperlet/29f2eb8d6b7b6d25aefae88e11dcdf8d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "Start random stress" | |
while true; do | |
RANYES=$[ ( $RANDOM % 4 ) + 1 ] | |
RANSTR=$[ ( $RANDOM % 300 ) + 1 ]s | |
RANSLEEP=$[ ( $RANDOM % 3000 ) + 1 ]s | |
echo "Start $RANYES proccess for $RANSTR seconds" | |
c=1 | |
while [[ $c -le $RANYES ]]; do | |
timeout $RANSTR yes > /dev/null & | |
let c=c+1 | |
done | |
wait | |
echo "Sleep for $RANSLEEP" | |
sleep $RANSLEEP | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment