Squid log format

From Wikitech
Revision as of 20:58, 22 January 2007 by Tim (Talk | contribs)

Jump to: navigation, search

$hostname %sn %ts.%03tu %tr %>a %Ss/%03Hs %<st %rm %ru %Sh/%<A %mt %{Referer}>h %{X-Forwarded-For}>h %{User-Agent}>h

Field indexes when space-separated:

  1. Hostname of the squid
  2. Sequence number
  3. Seconds (and milliseconds) since epoch
  4. Request service time in ms
  5. Client IP
  6. Squid request status, HTTP status code
  7. Reply size including HTTP headers
  8. Request method (GET/POST etc)
  9. URL
  10. Squid hierarchy status, peer IP
  11. MIME content type
  12. Referer header
  13. X-Forwarded-For header
  14. User-Agent header

Sample line, with the client IP address replaced with 1.2.3.4 to protect the innocent:

sq18.wikimedia.org 1715898 1169499304.066 0 1.2.3.4 TCP_MEM_HIT/200 13208 GET http://en.wikipedia.org/wiki/Main_Page NONE/- text/html - - Mozilla/4.0%20(compatible;%20MSIE%206.0;%20Windows%20NT%205.1;%20.NET%20CLR%201.1.4322)

Personal tools
Namespaces

Variants
Actions
Navigation
Ops documentation
Wiki
Toolbox