Online Book Reader

Home Category

Squid_ The Definitive Guide - Duane Wessels [144]

By Root 2134 0
#1

32 Socket 0 3 31 127.0.0.1.3438 ncsa_auth #3

33 Socket 0 0 0 127.0.0.1.3440 ncsa_auth #4

34 Socket 164 8835* 1070222* 212.47.19.52.2201 http://www.eyyubyaqubov.com/

35 Socket 177 6137* 249899* 212.47.19.25.3044 http://files10.rarlab.com/

36 Socket 0 0 0 127.0.0.1.3442 ncsa_auth #5

37 Socket 7 158783* 774 210.222.20.8.80 http://home.hanmir.com/c

38 Socket 166 1000* 148415* 202.17.13.8.5787 http://home.hanmir.com/d

The table has seven columns:

File

This is simply the file descriptor number. The list always starts with 3 because descriptors 0, 1, and 2 are reserved for stdin, stdout, and stderr. Any other gaps in the list represent closed descriptors.

Type

The type field contains one of the following values: File, Pipe, or Socket. The File type is used both for files storing cached responses and for log files, such as cache.log and access.log. The Pipe type represents kernel pipes used for interprocess communication. The Socket type is also occasionally used for interprocess communication, but it's mostly used for HTTP (and FTP) connections to clients and servers.

Tout

This is the general-purpose timeout value for the descriptor. It is expressed in minutes. Files and Pipes usually don't have a timeout, so this value is zero. For Sockets, however, if this number of minutes go by without any activity on the descriptor, Squid calls a timeout function.

Nread

This is where Squid reports the number of bytes read from the descriptor. An asterisk (*) after the number means Squid has a function (a read handler) registered to read additional data, if there is some available.

Nwrite

This column shows the number of bytes written to the descriptor. Again, the asterisk (*) indicates that a write handler is present for the descriptor. You can usually tell if a given socket is connected to a client or to a server by comparing the number of bytes read and written. Because requests are normally smaller than responses, a server connection has a higher Nread count than Nwrite. The opposite is true for client connections.

Remote Address

For Sockets, this field shows the remote TCP address of the connection. The format is similar to what you would find in netstat -n output: an IP address followed by the TCP port number.

Description

The description field indicates the descriptor's use. For Files, you'll see a pathname; for Pipes, a description to what the pipe is connected; and for Sockets, a URI, or at least the first part of it. A description such as web.icq.com idle connection indicates an idle persistent connection to an origin server. Similarly, Waiting for next request is an idle client-side persistent connection.

By default, the File Descriptor page isn't password-protected. However, you may want to give it a password because it contains some sensitive and, perhaps, personally identifiable information.

objects: All Cache Objects

Requesting this page results in a list of all objects in the cache. Be careful with this page because it can be extremely long. Furthermore, it contains low-level information that is probably useful only to developers.

For each cached object, Squid prints a sequence of lines, most of which look like this:

KEY FF1F6736BCC167A4C3F93275A126C5F5

STORE_OK NOT_IN_MEMORY SWAPOUT_DONE PING_NONE

CACHABLE,DISPATCHED,VALIDATED

LV:1020824321 LU:1020824671 LM:1020821288 EX:-1

0 locks, 0 clients, 1 refs

Swap Dir 0, File 0X010AEE

The first line shows the cache key—a 128-bit MD5 checksum of the URI. The same MD5 checksum appears in store.log and in the metadata at the beginning of each response cached on disk.

The second line shows four state variables of the StoreEntry data structure: store_status, mem_status, swap_status, and ping_status. Refer to the Squid source code if you'd like more information about them.

The third line is a list of the StoreEntry flags that are set. Search the source code for e->flags for more information.

The fourth line shows the values of four timestamps: last-validation, last-use, last-modification, and expiration. The last-modification and expiration

Return Main Page Previous Page Next Page

®Online Book Reader