| ||||||||||||||||||||||||||||||
|
Our primer offers an overview of Common and Squid log formats and the tools you may use to work with them.
During our ISP-Planet cache review series, we pored through dozens of access logs generated by six different caches. The products we tested generated access logs in two popular formats: the Common Log Format and the native Squid log format. Cache access logs can provide a wealth of information. Here, we offer a quick beginner's primer on cache log analysis. Common Log Format
Record Format host ident authuser [timestamp] "request" status bytes
Examples 192.168.1.142 [22/Dec/1999:19:41:30 -0500] "GET http://www.corecom.com/ HTTP/1.0" 200 1722 192.168.1.142 [22/Dec/1999:19:42:45 -0500] "GET http://www.corecom.com/ HTTP/1.0" 304 177
This example illustrates two HTTP GET requests made on http://www.corecom.com by a client browser running on 192.168.1.142. For the first request, the cache successfully retrieved a 1722 byte object from the origin server and returned it to the client. When this same object was requested again "if modified since", it was found to be in the cache and fresh. For further discussion, see HTTP status codes (below).
Some web servers and caches append other fields to the common log record. The extended log format used by some web servers adds referrer and user-agent fields. Squid v2.3 adds its own response and hierarchy codes (e.g., TCP_MISS:DIRECT) when emulating the common log format.
|
| ||||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||||||