VSL(7) | VSL(7) |
VSL - Varnish Shared Memory Logging
This document describes the format and content of all the Varnish shared memory logging tags. These tags are used by the varnishlog(1), varnishtop(1), etc. logging tools supplied with Varnish.
The format is:
%d %s %s | | | | | +- Backend display name | +---- VCL name +------- Connection file descriptor
NOTE: This tag is currently not in use in the Varnish log. It is mentioned here to document legacy versions of the log, or reserved for possible use in future versions.
The format is:
%d %s %s [ %s ] | | | | | | | +- Optional reason | | +------ "close" or "recycle" | +--------- Backend display name +------------ Connection file descriptor
The format is:
%d %s %s %s %s %s %s | | | | | | | | | | | | | +- "connect" or "reuse" | | | | | +---- Local port | | | | +------- Local address | | | +---------- Remote port | | +------------- Remote address | +---------------- Backend display name +------------------- Connection file descriptor
The format is:
%d %s | | | +- Backend display name +---- Connection file descriptor
NOTE: This tag is currently not in use in the Varnish log. It is mentioned here to document legacy versions of the log, or reserved for possible use in future versions.
The format is:
%s %s | | | +- Backend Port number +---- Backend IP4/6 address
NOTE: This tag is currently not in use in the Varnish log. It is mentioned here to document legacy versions of the log, or reserved for possible use in future versions.
The format is:
%s %s %s %s %u %u %u %f %f %s | | | | | | | | | | | | | | | | | | | +- Probe HTTP response / error information | | | | | | | | +---- Average response time | | | | | | | +------- Response time | | | | | | +---------- Probe window size | | | | | +------------- Probe threshold level | | | | +---------------- Number of good probes in window | | | +------------------- Probe window bits | | +---------------------- "healthy" or "sick" | +------------------------- "Back", "Still" or "Went" +---------------------------- Backend name
Probe window bits are:
'-': Could not connect '4': Good IPv4 '6': Good IPv6 'U': Good UNIX 'x': Error Xmit 'X': Good Xmit 'r': Error Recv 'R': Good Recv 'H': Happy
When the backend is just created, the window bits for health check slots that haven't run yet appear as '-' like failures to connect.
The format is:
%s %d %s | | | | | +- Reason | +---- Parent vxid +------- Type ("sess", "req" or "bereq")
The format is:
%d %d %d %d %d %d | | | | | | | | | | | +- Total bytes received | | | | +---- Body bytes received | | | +------- Header bytes received | | +---------- Total bytes transmitted | +------------- Body bytes transmitted +---------------- Header bytes transmitted
The format is:
%s: %s | | | +- Header value +----- Header name
NOTE: HTTP header fields are free form records and not strictly made of 2 fields. Accessing a specific header with the prefix notation helps treating the header value as a single string.
The format is:
%s: %s | | | +- Header value +----- Header name
NOTE: HTTP header fields are free form records and not strictly made of 2 fields. Accessing a specific header with the prefix notation helps treating the header value as a single string.
The format is:
%s: %s | | | +- Header value +----- Header name
NOTE: HTTP header fields are free form records and not strictly made of 2 fields. Accessing a specific header with the prefix notation helps treating the header value as a single string.
The format is:
%s: %s | | | +- Header value +----- Header name
NOTE: HTTP header fields are free form records and not strictly made of 2 fields. Accessing a specific header with the prefix notation helps treating the header value as a single string.
Debug messages may be added, changed or removed without prior notice and shouldn't be considered stable.
NB: This log record is masked by default.
The format is:
EXP_Rearm p=%p E=%f e=%f f=0x%x EXP_Inbox p=%p e=%f f=0x%x EXP_Kill p=%p e=%f f=0x%x EXP_When p=%p e=%f f=0x%x EXP_Expired x=%u t=%f LRU_Cand p=%p f=0x%x r=%d LRU x=%u LRU_Fail Legend: p=%p Objcore pointer t=%f Remaining TTL (s) e=%f Expiry time (unix epoch) E=%f Old expiry time (unix epoch) f=0x%x Objcore flags r=%d Objcore refcount x=%u Object VXID
Error messages should be self-explanatory, yet the http connection (HTC) class of errors is reported with these symbols:
Notice that some HTC errors are never emitted.
The format is:
%d %s %s | | | | | +---- 'stream' or '-' | +------- Text description of body fetch mode +---------- Body fetch mode
The format is:
%c %c %c %d %d %d %d %d | | | | | | | | | | | | | | | +- Bit length of compressed data | | | | | | +---- Bit location of 'last' bit | | | | | +------- Bit location of first deflate block | | | | +---------- Bytes output | | | +------------- Bytes input | | +---------------- 'E': ESI, '-': Plain object | +------------------- 'F': Fetch, 'D': Deliver +---------------------- 'G': Gzip, 'U': Gunzip, 'u': Gunzip-test
Examples:
U F E 182 159 80 80 1392 G F E 159 173 80 1304 1314
NB: This log record is masked by default.
The format is:
%u %f %f %f [%u [%u]] | | | | | | | | | | | +- Content length | | | | +----- Fetched so far | | | +--------- Keep period | | +------------ Grace period | +--------------- Remaining TTL +------------------ VXID of the object
The format is:
%u %f | | | +- Remaining TTL +---- VXID of the object
The format is:
%u %f | | | +- Remaining TTL +---- VXID of the object
The format is:
%s %d %s | | | | | +- Reason | +---- Child vxid +------- Child type ("req" or "bereq")
The format is:
%s: %s | | | +- Short description of the notice message +----- Manual page containing the detailed description
See the NOTICE MESSAGES section below or the individual VMOD manual pages for detailed information of notice messages.
The format is:
%s: %s | | | +- Header value +----- Header name
NOTE: HTTP header fields are free form records and not strictly made of 2 fields. Accessing a specific header with the prefix notation helps treating the header value as a single string.
The format is:
%s: %s | | | +- Header value +----- Header name
NOTE: HTTP header fields are free form records and not strictly made of 2 fields. Accessing a specific header with the prefix notation helps treating the header value as a single string.
The format is:
%d %d %d %d | | | | | | | +------- Piped bytes to client | | +---------- Piped bytes from client | +------------- Backend request headers +---------------- Client request headers
The format is:
%d %s %d %s %d | | | | | | | | | +- server port | | | +---- server ip | | +------- client port | +---------- client ip +------------- PROXY protocol version All fields are "local" for PROXY local connections (command 0x0)
%d %d %d %d %d %d | | | | | | | | | | | +- Total bytes transmitted | | | | +---- Body bytes transmitted | | | +------- Header bytes transmitted | | +---------- Total bytes received | +------------- Body bytes received +---------------- Header bytes received
The format is:
%s: %s | | | +- Header value +----- Header name
NOTE: HTTP header fields are free form records and not strictly made of 2 fields. Accessing a specific header with the prefix notation helps treating the header value as a single string.
The format is:
%s %s %s | | | | | +-- Listener name (from -a) | +----- Client Port number (0 for Unix domain sockets) +-------- Client IP4/6 address (0.0.0.0 for UDS)
The format is:
%s: %s | | | +- Header value +----- Header name
NOTE: HTTP header fields are free form records and not strictly made of 2 fields. Accessing a specific header with the prefix notation helps treating the header value as a single string.
The format is:
%s: %s | | | +- Header value +----- Header name
NOTE: HTTP header fields are free form records and not strictly made of 2 fields. Accessing a specific header with the prefix notation helps treating the header value as a single string.
The format is:
%s: %s | | | +- Header value +----- Header name
NOTE: HTTP header fields are free form records and not strictly made of 2 fields. Accessing a specific header with the prefix notation helps treating the header value as a single string.
The format is:
%s %f | | | +- How long the session was open +---- Why the connection closed
The format is:
%s %s %s %d %d %s | | | | | | | | | | | +- Detailed error message | | | | +---- Error Number (errno) from accept(2) | | | +------- File descriptor number | | +---------- Local TCP port / 0 for UDS | +------------- Local IPv4/6 address / 0.0.0.0 for UDS +---------------- Socket name (from -a argument)
The format is:
%s %d %s %s %s %f %d | | | | | | | | | | | | | +- File descriptor number | | | | | +---- Session start time (unix epoch) | | | | +------- Local TCP port / 0 for UDS | | | +---------- Local IPv4/6 address / 0.0.0.0 for UDS | | +------------- Socket name (from -a argument) | +---------------- Remote TCP port / 0 for UDS +------------------- Remote IPv4/6 address / 0.0.0.0 for UDS
The format is:
%s %s | | | +- Name of storage backend +---- Type ("malloc", "file", "persistent" etc.)
The format is:
%s %d %d %d %d [ %d %d %u %u ] %s | | | | | | | | | | | | | | | | | | | +- "cacheable" or "uncacheable" | | | | | | | | +------ Max-Age from Cache-Control header | | | | | | | +--------- Expires header | | | | | | +------------ Date header | | | | | +--------------- Age (incl Age: header value) | | | | +-------------------- Reference time for TTL | | | +----------------------- Keep | | +-------------------------- Grace | +----------------------------- TTL +-------------------------------- "RFC", "VCL" or "HFP"
The four optional fields are only present in "RFC" headers.
Examples:
RFC 60 10 -1 1312966109 1312966109 1312966109 0 60 cacheable VCL 120 10 0 1312966111 uncacheable HFP 2 0 0 1312966113 uncacheable
Time stamps are issued by Varnish on certain events, and show the absolute time of the event, the time spent since the start of the work unit, and the time spent since the last timestamp was logged. See the TIMESTAMPS section below for information about the individual time stamps.
The format is:
%s: %f %f %f | | | | | | | +- Time since last timestamp | | +---- Time since start of work unit | +------- Absolute time of event +----------- Event label
The format is:
%s %s [%s [fixed: %s]] | | | | | | | +- Fixed entry (see vcc_acl_pedantic parameter) | | +------------ Matching entry (only for MATCH) | +---------------- Name of the ACL +-------------------- MATCH or NO_MATCH
MATCH denotes an ACL match NO_MATCH denotes that a checked ACL has not matched
The format is:
%s %u %u.%u.%u | | | | | | | | | +- VCL program line position | | | +---- VCL program line number | | +------- VCL program source index | +---------- VCL trace point index +------------- VCL configname
NB: This log record is masked by default.
The format is:
%s [ %s %s ] | | | | | +- Name of label used to find it | +---- "via" +--------- Name of VCL put in use
The format is:
%s %d %d | | | | | +- Total bytes produced | +---- Number of calls made +------- Name of filter
NB: This log record is masked by default.
The format is:
%s %d %d | | | | | +- Total bytes produced | +---- Number of calls made +------- Name of filter
NB: This log record is masked by default.
The format is:
%p %s | | | +- [start|end] +---- Worker struct pointer
NB: This log record is masked by default.
Timestamps are inserted in the log on completing certain events during the worker thread's task handling. The timestamps has a label showing which event was completed. The reported fields show the absolute time of the event, the time spent since the start of the task and the time spent since the last timestamp was logged.
The timestamps logged automatically by Varnish are inserted after completing events that are expected to have delays (e.g. network IO or spending time on a waitinglist). Timestamps can also be inserted from VCL using the std.timestamp() function. If one is doing time consuming tasks in the VCL configuration, it's a good idea to log a timestamp after completing that task. This keeps the timing information in subsequent timestamps from including the time spent on the VCL event.
The following timestamps are client timestamps specific to pipe transactions:
The following timestamps change meaning in a pipe transaction:
Notice messages contain informational messages about the handling of a request. These can be exceptional circumstances encountered that causes deviation from the normal handling. The messages are prefixed with vsl: for core Varnish generated messages, and VMOD authors are encouraged to use vmod_<name>: for their own notice messages. This matches the name of the manual page where detailed descriptions of notice messages are expected.
The core messages are described below.
The backend answered 304 Not Modified on a conditional fetch using an object that has not yet been fully fetched as the stale template object. This can only happen when the TTL of the object is less than the time it takes to fetch it. The fetch is halted until the stale object is fully fetched, upon which the new object is created as normal. While waiting, any grace time on the stale object will be in effect.
Objects are primarily looked up from an index using the hash key computed from the hash_data() VCL function. When variants are involved, that is to say when a backend response was stored with a Vary header, a secondary lookup is performed but it is not indexed. As the number of variants for a given key increases, this can slow cache lookups down, and since this happens under a lock, this can greatly increase lock contention, even more so for frequently requested objects. Variants should therefore be used sparingly on cacheable responses, but since they can originate from either VCL or origin servers, this notice should help identify problematic resources.
This document was initially written by Poul-Henning Kamp, and later updated by Martin Blix Grydeland.
This document is licensed under the same licence as Varnish itself. See LICENCE for details.