[squid-users] Need clarifications on custom log timestamps

Amos Jeffries squid3 at treenet.co.nz
Wed Feb 26 06:58:53 UTC 2025


On 26/02/25 00:33, BENJAMIN DELANNOY wrote:
>  > Please detail what you mean by "choice" or "decision". For example, do
>> you want to stop the timer when Squid makes its final http_access decision?
> 
> I mean I want to monitor the latency on what I could manage : the 
> communication between client & squid, the time squid uses to process 
> requests. But not the time spent by the destination server as I don't 
> manage it.
> This could be multiple monitors if 1 is too complicated or not possible. 
> So yes for example a timer that stop when Squid makes its 
> final http_access decision (in case of http or bumped https) or its 
> final ssl_bump splice decision.
> 

In theory what you want is the %busy_time logformat.

However, the calculations for that are still apparently inaccurate. So 
you would be best also logging these for comparison measures:

  %dt = DNS latency

  %<tt - %<pt = forwarding-latency
     .. the time spent by Squid fetching the response.
     .. excluding time waiting for it to arrive from the upstream server
     .. also excluding anything that happens while the server is 
delivering response (eg. for responses >4KB).

  %tr - %<pt = total Squid latency
     .. including delays from parallel traffic
     .. excluding same as forwarding-latency above


HTH
Amos



More information about the squid-users mailing list