Created
January 18, 2024 20:51
-
-
Save pancudaniel7/feb223789e038f665edf08a59aef9cd1 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 | |
# Size of each log message | |
LOG_MESSAGE_SIZE=100000 | |
# Function to rapidly log messages | |
function log_messages { | |
for i in {1..100000}; do | |
LOG_MESSAGE=$(head -c "$LOG_MESSAGE_SIZE" /dev/urandom | tr -dc 'A-Za-z0-9') | |
logger -p user.notice "$LOG_MESSAGE" | |
done | |
} | |
echo "Starting to fill the syslog to trigger logrotate..." | |
log_messages | |
echo "Finished logging messages." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment