Created
June 24, 2015 14:01
-
-
Save ssoto/7ebd05e85c5f6ae223e9 to your computer and use it in GitHub Desktop.
Random syslog message sent each random seconds
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 | |
POS=2 | |
LEN=16 | |
SECONDS_MAX=10 | |
while true; do | |
str1=$( echo -n `date +\"%s\"` | md5sum | md5sum ) | |
randstring="${str1:$POS:$LEN}" | |
logger -t "kafka-test" Random message "$randstring" | |
RANDOM_SEC=`shuf -i 1-$SECONDS_MAX -n 1` | |
sleep $RANDOM_SEC | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment