diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 16:28:20 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 16:28:20 +0000 |
commit | dcc721a95bef6f0d8e6d8775b8efe33e5aecd562 (patch) | |
tree | 66a2774cd0ee294d019efd71d2544c70f42b2842 /tests/omfile-sizelimitcmd-many.sh | |
parent | Initial commit. (diff) | |
download | rsyslog-dcc721a95bef6f0d8e6d8775b8efe33e5aecd562.tar.xz rsyslog-dcc721a95bef6f0d8e6d8775b8efe33e5aecd562.zip |
Adding upstream version 8.2402.0.upstream/8.2402.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/omfile-sizelimitcmd-many.sh')
-rwxr-xr-x | tests/omfile-sizelimitcmd-many.sh | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/tests/omfile-sizelimitcmd-many.sh b/tests/omfile-sizelimitcmd-many.sh new file mode 100755 index 0000000..b1c8d0b --- /dev/null +++ b/tests/omfile-sizelimitcmd-many.sh @@ -0,0 +1,36 @@ +#!/bin/bash +# addd 2023-01-11 by RGerhards, released under ASL 2.0 +. ${srcdir:=.}/diag.sh init +export NUMMESSAGES=50000 +echo "ls -l $RSYSLOG_DYNNAME.channel.* +mv -f $RSYSLOG_DYNNAME.channel.log.prev.9 $RSYSLOG_DYNNAME.channel.log.prev.10 2>/dev/null +mv -f $RSYSLOG_DYNNAME.channel.log.prev.8 $RSYSLOG_DYNNAME.channel.log.prev.9 2>/dev/null +mv -f $RSYSLOG_DYNNAME.channel.log.prev.7 $RSYSLOG_DYNNAME.channel.log.prev.8 2>/dev/null +mv -f $RSYSLOG_DYNNAME.channel.log.prev.6 $RSYSLOG_DYNNAME.channel.log.prev.7 2>/dev/null +mv -f $RSYSLOG_DYNNAME.channel.log.prev.5 $RSYSLOG_DYNNAME.channel.log.prev.6 2>/dev/null +mv -f $RSYSLOG_DYNNAME.channel.log.prev.4 $RSYSLOG_DYNNAME.channel.log.prev.5 2>/dev/null +mv -f $RSYSLOG_DYNNAME.channel.log.prev.3 $RSYSLOG_DYNNAME.channel.log.prev.4 2>/dev/null +mv -f $RSYSLOG_DYNNAME.channel.log.prev.2 $RSYSLOG_DYNNAME.channel.log.prev.3 2>/dev/null +mv -f $RSYSLOG_DYNNAME.channel.log.prev.1 $RSYSLOG_DYNNAME.channel.log.prev.2 2>/dev/null +mv -f $RSYSLOG_DYNNAME.channel.log.prev $RSYSLOG_DYNNAME.channel.log.prev.1 2>/dev/null +mv -f $RSYSLOG_DYNNAME.channel.log $RSYSLOG_DYNNAME.channel.log.prev +" > $RSYSLOG_DYNNAME.rotate.sh +chmod +x $RSYSLOG_DYNNAME.rotate.sh +generate_conf +add_conf ' +template(name="outfmt" type="string" string="%msg:F,58:2%\n") + +if $msg contains "msgnum:" then { + action(type="omfile" file="'$RSYSLOG_DYNNAME.channel.log'" template="outfmt" + rotation.sizeLimit="50k" + rotation.sizeLimitCommand="./'$RSYSLOG_DYNNAME.rotate.sh'") +} +' +startup +injectmsg +shutdown_when_empty +wait_shutdown +ls -l $RSYSLOG_DYNNAME.channel.* +cat $RSYSLOG_DYNNAME.channel.* > $RSYSLOG_OUT_LOG +seq_check +exit_test |