Re: stopping multilog

[email protected] (Paul Jarc) Mon, 29 Sep 2008 12:43:53 -0400
Newsgroups gmane.comp.djb.syslog
Organization What did you have in mind? A short, blunt, human pyramid?
Message-ID <[email protected]>
richard lucassen <[email protected]> wrote:
> I want to start a script /after/ the two processors have done their
> job. So, is adding a third processor the right way to achieve this?:

Each processor only gets used for the directory that follows it.  So
if you specify a processor with a directory after it, that processor
will never be used.  You could do something like this:

#!/bin/sh
exec 2>&1

exec /usr/local/bin/multilog \
  '-*' '+*mark=384*' \
  !"/root/dynfw3/conntrack/log/processor1" s16777215 n2 ./eth0 \
  '-*' '+*mark=387*' \
  !"/root/dynfw3/conntrack/log/processor2;
    /path/to/script-that-runs-after-the-other-processors" s16777215 n2 ./eth1 \

Each processor is run by passing the string to /bin/sh -c, so multiple
commands like this is ok.  Note that if the eth1 log fills up and gets
rotated before SIGALRM comes, then those last two ocmmand will both
run, even if there's nothing new to do for the eth0 log.


paul