Hi,
I have made a patch for Squid 2.3-STABLE4 which enables it to write to a
logfile on behalf of which clients it transfers data.
I am using this to inform a Linux program which performs shaping (called wrr)
and a program which makes network statistics (called wipl). Wrr and Wipl
uses the information to shape and to make statistics as if the packets from
squid were coming directly from the machines which made squid transfer
the packets.
To be more detailed, the logfile is created as a named pipe. A second program
then reads from the pipe and makes the information available by accepting
inbound TCP connections from the network. A third program on another machine
then connects to second program, reads the information, and then
informs wrr and wipl.
The patch is available at:
http://wipl-wrr.dkik.dk/wipl-wrr/
The patch is included in the Proxyremap packet. This can be downloaded by
first clicking on "The proxyremap package" and the scroll to the bottom
of the page to the download section. Other information about the patch
is also included in the package.
Now:
1) Of course I would like Squid to have such a feature build in.
I suppose other shapers and other realtime network statistics
software could use this kind of information too?
2) The patch is somewhat inelegant. It would be better if Squid
would accept the TCP connections directly instead of depending
on writing to a named pipe which another program then reads from.
3) The patch is incomplete - for example it does not work with neighbor
caches.
4) I am not a Squid expert and I am not sure if there is any problems
with the patch. For example if Squid might block because of the patch
or maybe will skip writing some information to the pipe. The code
I use to write to the pipe is similar to the code used to write
the useragent log.
So what I say is, that if anyone would like to look through the patch and
make some comments or improvements they are more than welcome.
Thanks to Henrik Nordstrom and Duane Wessels who almost year ago gave hints
on how to implement this patch.
Christian
PS: Using a feature of qmail I have subscribed to this list with the address worm-squid-users@dkik.dk. All messages sent to this address is put in a special folder. It would be really nice if I could still use my normal email address, namely worm@dkik.dk to post messages here.
Received on Sat Aug 12 2000 - 05:41:26 MDT
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:54:50 MST