[ Table of Contents ] [ Previous Chapter ] [ Next Chapter ]



C: Squid Log Reference

Format

 

These are the definitions for the various log format components:

 

Timestamp

 

The time when the request is completed (socket closed). The format is "Unix time" (seconds since Jan 1, 1970) with millisecond resolution.

 

Timestamp1

 

When the request is completed (Day/Month/CenturyYear:Hour:Minute:Second GMT-Offset)

 

Elapsed

 

The elapsed time of the request, in milliseconds. This is the time between the accept() and close() of the client socket.

 

Client

 

The IP address of the connecting client, or the FQDN if the 'log_fqdn' option is enabled in the config file.

 

Action

 

The Action describes how the request was treated locally (hit, miss, etc). All the tags are described below.

 

Code

 

The HTTP reply code taken from the first line of the HTTP reply header. For ICP requests this is always "000." If the reply code was not given, it will be logged as "555."

 

Size

 

For TCP requests, the amount of data written to the client. For UDP requests, the size of the request. (in bytes)

 

Method

 

The HTTP request method (GET, POST, etc), or ICP_QUERY for ICP requests.

 

URI

 

The requested URI.

 

Ident

 

The result of the RFC931/ident lookup of the client username. If RFC931/ident lookup is disabled (default: `ident_lookup off'), it is logged as - .

 

Hierarchy

 

A description of how and where the requested object was fetched.

 

From

Hostname of the machine where we got the object.

 

Content

 

Content-type of the Object (from the HTTP reply header).

 

HTTP Header Fields

 

You can use any HTTP Header Field, this is just a list of the most commonly used with definitions. For a complete list, check Hypertext Transfer Protocol -- http/1.1.

 

HTTP_ACCEPT

 

The MIME types which the client will accept, as given by HTTP headers. Other protocols may need to get this information from elsewhere. Each item in this list should be separated by commas as per the HTTP spec.

Format: type/subtype, type/subtype

 

HTTP_USER_AGENT

 

The browser the client is using to send the request. General format: software/version library/version.

The server sends back to the client:

A status code that indicates whether the request was successful or not. Typical error codes indicate that the requested file was not found, that the request was malformed, or that authentication is required to access the file.

The data itself. Since HTTP is liberal about sending documents of any format, it is ideal for transmitting multimedia such as graphics, audio, and video files.

It also sends back information about the object being returned.

 

Content-Type

 

Indicates the media type of the data sent to the recipient or, in the case of the HEAD method, the media type that would have been sent had the request been a GET. Content-Type: text/html

 

Date

 

The date and time at which the message was originated.

Date: Tue, 15 Nov 1994 08:12:31 GMT

 

Expires

 

The date after which the information in the document ceases to be valid. Caching clients, including proxies, must not cache this copy of the resource beyond the date given, unless its status has been updated by a later check of the origin server.

Expires: Thu, 01 Dec 1994 16:00:00 GMT

 

From

 

An Internet e-mail address for the human user who controls the requesting user agent.

From: Stars@WDVL.com

The request is being performed on behalf of the person given, who accepts responsibility for the method performed. Robot agents should include this header so that the person responsible for running the robot can be contacted if problems occur on the receiving end.

 

If-Modified-Since

 

Used with the GET method to make it conditional: if the requested resource has not been modified since the time specified in this field, a copy of the resource will not be returned from the server; instead, a 304 (not modified) response will be returned without any data.

If-Modified-Since: Sat, 29 Oct 1994 19:43:31 GMT

 

Last-Modified

 

Indicates the date and time at which the sender believes the resource was last modified. Useful for clients that eliminate unnecessary transfers by using caching.

Last-Modified: Tue, 15 Nov 1994 12:45:26 GMT

Location

 

The Location response header field defines the exact location of the resource that was identified by the request URI. If the value is a full URL, the server returns a "redirect" to the client to retrieve the specified object directly.

Location: http://WWW.Stars.com/Tutorial/HTTP/index.html

If you want to reference another file on your own server, you should output a partial URL, such as the following:

Location: /Tutorial/HTTP/index.html

 

Referer

 

Allows the client to specify, for the server's benefit, the address (URI) of the resource from which the request URI was obtained. This allows a server to generate lists of back-links to resources for interest, logging, optimized caching, etc. It also allows obsolete or mistyped links to be traced for maintenance.

Referer: http://WWW.Stars.com/index.html

 

Server

 

The Server response header field contains information about the software used by the origin server to handle the request.

Server: CERN/3.0 libwww/2.17

 

User-Agent

 

Information about the user agent originating the request. This is for statistical purposes, the tracing of protocol violations, and automated recognition of user agents for the sake of tailoring responses to avoid particular user agent limitations - such as the inability to support HTML tables.

User-Agent: CERN-LineMode/2.15 libwww/2.17b3

 

HTTP Status Codes

100 Continue

101 Switching Protocols

200 OK

201 Created

202 Accepted

203 Non-Authoritative Information

204 No Content

205 Reset Content

206 Partial Content

300 Multiple Choices

301 Moved Permanently

302 Moved Temporarily

303 See Other

304 Not Modified

305 Use Proxy

400 Bad Request

401 Unauthorized

402 Payment Required

403 Forbidden

404 Not Found

405 Method Not Allowed

406 Not Acceptable

407 Proxy Authentication Required

408 Request Time-out

409 Conflict

410 Gone

411 Length Required

412 Precondition Failed

413 Request Entity Too Large

414 Request-URI Too Large

415 Unsupported Media Type

500 Internal Server Error

501 Not Implemented

502 Bad Gateway

503 Service Unavailable

504 Gateway Time-out

505 HTTP Version not supported



Copyright 1999. Tenon Intersystems. All Rights Reserved.