----- Original Message -----
From: "Henrik Nordstrom" <hno@hem.passagen.se>
To: "Mike Everest" <mike@gsat.net.au>
Cc: <squid-users@squid-cache.org>
Sent: Tuesday, March 27, 2001 6:54 PM
Subject: [squid-users] Re: authenticate_program bombs out
> Mike Everest wrote:
>
> > > a) Use a "log-tail daemon" that reads Squid's log file and
> > > forwards the
> > > entries to a SQL server, combined with semi-frequent log rotation
to
> > > keep the on-disk size down.
> >
> > i'd thought about that, but i want to also use the log data to
manage a
> > 'download quota' system so it really needs to be kept reasonably up
to date.
>
> A log tail daemon keeps the SQL data up to date. There might be a
> seconds gap or so, but not much more if the SQL server can keep up...
>
> > > b) Logging to a pipe where another daemon listens, completely
avoiding
> > > touching disk.
> >
> > now *that* sounds interesting - any ideas where i might be able to
get some
> > further info on how to do that?
>
> Personally I prefer the log-tail approach, but in UNIX you do this by
>
> mknod p /path/to/log/file
> sql_logger </path/to/log/file
>
> How to do something like this on WIN32 I have no idea.
>
> > umm, so are you suggesting that the log daemon can read the log file
even
> > while sqid is writing to it? i am not at all familiar with how that
could
> > be achieved - could you point me to some resources?
>
> Quite simple. The log-tail daemon opens the log and then watches the
> filesize of it, reading data when the file has grown. (actually, it is
> sufficient to just read until EOF, sleep a little and then retry).
>
> The UNIX command tail is one tool for doing this:
>
> tail +0f /path/to/log/file | sql_logger
>
> --
> Henrik Nordstrom
> Squid hacker
>
Mike, have you looked at cygwin? (http://cygwin.com). In a nutshell it's
a dll which programs can link to that makes all these things possible
under win32. (Well named pipes is missing at the moment :]). Very very
very useful.
Rob
Received on Tue Mar 27 2001 - 02:34:01 MST
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:58:59 MST