Re: [squid-users] cache_log

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Sun, 18 May 2003 11:26:34 +0200

On Sunday 18 May 2003 10.01, la. w wrote:
> squid-2.4/Suse8.1
>
> squid.conf has default
> # cache_log /var/log/squid/cache.log
>
> Do I need a cache.log under normal usage?

Not when everything works perfect, but if you at any point have or
have had any kind of problem cache.log provides valuable information.

There normally is not reason to disable this log. The amount of
information logged here when everything works like expected is close
to nothing.

> These were all warnings about average response time in previous m
> minute being xxx seconds, format is dd-hh:mm <seconds>.

Then you need to investigate why the response time is so slow.

> I wish the warning messages were a bit more helpful and told if it
> was just 1 site being slow or several sites....etc.
>
> Are these response time / page or per element on the page? Could
> they theoretically be entirely DNS/bind delays or is that excluded
> from these timings?

It could be anything.

The warning just tells that the median (or average, I do not remember)
5 minute response time is too large. As the response time is
calculated on all requests over a period of 5 minutes it is hard for
Squid to single out exacly which requests contributed most to this.
For this purpose you should use the native log format and make some
statistics on response time distribution of the requests for the
period Squid complained about..

> I *wish* -- that the squid native format would print times in human
> readable format since that's really the only part of the log that
> makes me want to use the httpd native format.

I rarely find this a problem. When I need the timestamps in human
readable format I do

cat access.log | grep what.i.am.looking.for | perl -e
's/(\d+)/localtime($1)/e'

> I wonder -- am I gonzo in wanting to introduce a third log format
> that is squid native but with human readable fields?

There is already a project running for implementing custom log formats
similar to the LogFormat function of Apache. Hopefully this will be a
standard function of Squid-3.1.

Regards
Henrik

-- 
Donations welcome if you consider my Free Squid support helpful.
https://www.paypal.com/xclick/business=hno%40squid-cache.org
If you need commercial Squid support or cost effective Squid or
firewall appliances please refer to MARA Systems AB, Sweden
http://www.marasystems.com/, info@marasystems.com
Received on Sun May 18 2003 - 03:26:30 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:16:43 MST