mirror of
https://github.com/rsyslog/rsyslog.git
synced 2025-12-20 10:50:41 +01:00
imfile: Initial implementation of solaris FEN API (without wildcards) FEN API is used to implement simular event based file monitoring like with inotify. This commit provides partial functionality. It supports event-driven processing of files but does not yet provide wildcard functionality. Wildscards will be provided by a later commit. This can be committed as-is because the previous code did also not provide wildcard support, so this is an improvement for Solaris in any case. see also https://github.com/rsyslog/rsyslog/issues/1954
32 lines
966 B
Bash
Executable File
32 lines
966 B
Bash
Executable File
#!/bin/bash
|
|
# This is part of the rsyslog testbench, licensed under GPLv3
|
|
export TESTMESSAGES=10000
|
|
export TESTMESSAGESFULL=19999
|
|
echo [imfile-rename.sh]
|
|
. $srcdir/diag.sh check-inotify-only
|
|
. $srcdir/diag.sh init
|
|
|
|
# generate input file first.
|
|
./inputfilegen -m $TESTMESSAGES > rsyslog.input.1.log
|
|
ls -l rsyslog.input*
|
|
|
|
. $srcdir/diag.sh startup imfile-wildcards-simple.conf
|
|
|
|
# sleep a little to give rsyslog a chance to begin processing
|
|
sleep 5
|
|
|
|
# Move to another filename
|
|
mv rsyslog.input.1.log rsyslog.input.2.log
|
|
|
|
# generate some more input into moved file
|
|
./inputfilegen -m $TESTMESSAGES -i $TESTMESSAGES >> rsyslog.input.2.log
|
|
ls -l rsyslog.input*
|
|
|
|
# sleep a little to give rsyslog a chance to begin processing
|
|
sleep 5
|
|
|
|
. $srcdir/diag.sh shutdown-when-empty # shut down rsyslogd when done processing messages
|
|
. $srcdir/diag.sh wait-shutdown # we need to wait until rsyslogd is finished!
|
|
. $srcdir/diag.sh seq-check 0 $TESTMESSAGESFULL
|
|
. $srcdir/diag.sh exit
|