logging to a pipe?
Gregory Hicks
ghicks at cadence.com
Mon Aug 30 20:05:53 UTC 2004
>
> Peter
>
> "Marten Lehmann" <lehmann at cnm.de> wrote in message
> news:cgkget$1v9u$1 at sf1.isc.org...
> > > Correct. The ARM makes it crystal-clear that the reserved word "file"
> > > is followed by a pathname enclosed in double quotes.
> >
> > Ok so far. But I need to parse the log in realtime and what's easier
> > than logging to a script which can select the useful entries and react
> > accordingly? A script can receive input continuesly but it's hard to
[...]
I'm not sure what you're trying to do, but a "pipe" is just a "special"
file. MANUALLY create the pipe and then name the pipe in the options
portion of named.conf and process away.
mknod /var/log/named.pipe.queries p (under Solaris, this creates a 'pipe')
Modify the startup script so that when named is started, a 'processing
script' is also started in "detached" mode. One that I use for
redirecting sendmail messages/errors is:
cat /var/log/mail-pipe | while read line1 ; do
echo $line1|grep sendmail.external >> /var/log/mail.external
echo $line1|grep sendmail.internal >> /var/log/mail.internal
echo $line1|grep -v sendmail.internal|grep -v sendmail.external >> /var/log/mail.common
done
There are two sendmail processes started at boot time. One talks to
the internet on the outside and a virus scanner on the "inside". The
virus scanner takes messages from the external sendmail and passes them
to the "internal" sendmail.
Just a thought...
Regards,
Gregory Hicks
-------------------------------------------------------------------
Gregory Hicks
Cadence Design Systems
555 River Oaks Pkwy M/S 6B1
San Jose, CA 95134
I am perfectly capable of learning from my mistakes. I will surely
learn a great deal today.
"A democracy is a sheep and two wolves deciding on what to have for
lunch. Freedom is a well armed sheep contesting the results of the
decision." - Benjamin Franklin
"The best we can hope for concerning the people at large is that they
be properly armed." --Alexander Hamilton
More information about the bind-users
mailing list