Re: [squid-users] upload data report

From: Muhammad Yousuf Khan <sirtcp_at_gmail.com>
Date: Sat, 15 Dec 2012 14:41:48 +0500

[cut]
>
>
> Yes. This is because every transaction in HTTP has data flowing in both
> directions.
>
> %>st logs the size of transaction for request.

now i am confused.

as per squid document
http://www.squid-cache.org/Versions/v2/2.7/cfgman/logformat.html

default log formate of squid log is "logformat squid %ts.%03tu %6tr
%>a %Ss/%03Hs %<st %rm %ru %un %Sh/%<A %mt"

means in default format squid is using only %<st, as mantioned in the format.

actually i am confused bacause and i can not understand the purpose
of %<st %>st because as per my finding %<st is giving me the actual
value of download and upload and same entry goes in both both cases
instead of some random numbers. for example i test an upload on my
live.com email account and the size of that file was 2.2 MB
here is the log

this is default log of access.log as mantioned in the official
document. probably based on only "%<st"

1355559811.654 485143 10.51.100.240 TCP_MISS/200 18155070 CONNECT
snt121.mail.live.com:443 - DIRECT/65.55.68.103 -

this is my created log formate containing both values %<st and %>st
and the value that i get by %>st not giving me the upload size.

1355559811.654 485143 10.51.100.240 TCP_MISS/200 18155070 181 CONNECT
snt121.mail.live.com:443 - DIRECT/65.55.68.103 -

so the confusing part is second log entry.

i found nothing but a figure of 181 (as %>st) which is no near to 2 MB
in any case. however the value of %<st is 18155070 which is the
actuall size of the file that i uploaded. which i can also see in
default access.log

so the question is if i am getting the upload and download value by
%<st then what is purpose of tracking %>st?

can i just "cat" access.log file and "grep" only "CONNECT" value. will
this not help me in my case. ? for example
"cat access.log | grep CONNECT"

please correct me if doing something wrong i am not very experienced with SQUID.

Thanks

> You can also log the size of just the headers and subtract one from the
> other to get body octet sizes (if any).

>

> But in practice if you are billing it is best to use %st and bill on total
> transaction bytes sent regardless of direction.

Thanks for the tip :) but i am not billing however just wanted to know
only the upload status peruser and on destination bases. so that
concern department could investigate what users are uploading.

>
> Amos
Received on Sat Dec 15 2012 - 09:41:56 MST

This archive was generated by hypermail 2.2.0 : Sat Dec 15 2012 - 12:00:05 MST