Alter.Org.UA  
 << Back Home RU ru   Donate Donate www/www1/www2

Patch for Squid, which enables logging both request+reply sizes

by Alter (alterX@alter.org.ua (remove X))

Patches for Squid, those enable logging of total size of both http-request and reply. Rather useful for calculating amount of traffic passed via POST-requests, e.g. file upload on web-mail. By default only http-reply size is written to log.

Squid 2.5.14 (r4)

squid25_14_4.tot_req_sz.patch.gz

Patch to Squid 2.5-stable14 (r4). Extends format of logformat option of squid.conf. You can use '>st' and 'st' to log request size and total size respectively. If you use 'st' instead of '<st', squid will log to access.log total request size instead of reply size. Like it was with enabled log_total_request_size in previous patch. For example:

logformat altsquid  %ts.%03tu %6tr %>a %Ss/%03Hs %st %rm %ru %un %Sh/%<A %mt
access_log /usr/local/squid/logs/access.log altsquid

2007.01.28

Squid 2.4.7

squid247.tot_req_sz.patch.zip

Patch to Squid 2.4-stable7. Adds to squid.conf option log_total_request_size:

#  TAG: log_total_request_size  on|off
#        Write total request size instead of reply only.
#
#Default:
# log_total_request_size off

When the option is enabled, data size field in access.log is filled with total size of both http-request and reply. By default only http-reply size is written to log.


2005.11.29

See also:


Mail to alterX@alter.org.ua (remove X)  
designed by Alter aka Alexander A. Telyatnikov powered by Apache+PHP under FBSD © 2002-2017