Log analysis and stats | _ | _ | _ |
INDEX BACK NEXT | _ | _ | _ |
Introduction |
Tools |
Analysis |
Not everyone expects the same thing from their proxy - the most common usage is to save network traffic, though some people use it as an access-control system. Some of the above utilities will give you only a portion of these.
You should run the analysis scripts on a different machine to your cache server, as squid seems to get very touchy if it's disk throughput is very slow. It's probably best to set up a script that copies the logs to another machine in the middle of the night (using something like scp -c none cache:/usr/local/squid/access.log.0 . Don't use rcp, since it has 0 security)
Note also that some of the utilities above give you information about 'the average time to complete a request'. This is actually a little misleading, since when squid sends data to a client it normally puts the data in a kernel buffer, the contents of which the kernel then handles as it transmits the data to the client. In most cases this buffer is larger than the actual object being sent, and if it comes from the disk cache it will seem to take a very short time to send, since once it's in a kernel buffer, squid has no idea how long it takes for the kernel to send the data. If you want to know how loaded your cache is, make a query from a completely unloaded machine to the cache for a page that is 'close' to the cache network wise (such as your local web server), and then do a query to the same server directly. Check the difference in latency then to see if the cache is slowing down the connections. Check the performance section for more details.
The Squid Users guide is copyright Oskar Pearson oskar@is.co.za This page is copyright Mark Visser and Oskar Pearson
If you like the layout (I do), I can only thank William Mee, and hope he forgives me for stealing it. This section was almost entirely contributed by Mark Visser (mark@cal026031.student.utwente.nl). Thanks to Mark!