1VSL(7)                                                                  VSL(7)
2
3
4

NAME

6       VSL - Varnish Shared Memory Logging
7

OVERVIEW

9       This  document  describes  the  format  and  content of all the Varnish
10       shared memory logging tags. These tags are used by  the  varnishlog(1),
11       varnishtop(1), etc.  logging tools supplied with Varnish.
12
13   VSL tags
14       Backend - Backend selected
15              Logged  when  a  connection  is  selected for handling a backend
16              request.
17
18              The format is:
19
20                 %d %s %s
21                 |  |  |
22                 |  |  +- Backend display name
23                 |  +---- VCL name
24                 +------- Connection file descriptor
25
26                 NOTE: This tag is currently not in use in the Varnish log.
27                 It is mentioned here to document legacy versions of the log,
28                 or reserved for possible use in future versions.
29
30       BackendClose - Backend connection closed
31              Logged when a backend connection is closed.
32
33              The format is:
34
35                 %d %s [ %s ]
36                 |  |    |
37                 |  |    +- Optional reason
38                 |  +------ Backend display name
39                 +--------- Connection file descriptor
40
41       BackendOpen - Backend connection opened
42              Logged when a new backend connection is opened.
43
44              The format is:
45
46                 %d %s %s %s %s %s
47                 |  |  |  |  |  |
48                 |  |  |  |  |  +- Local port
49                 |  |  |  |  +---- Local address
50                 |  |  |  +------- Remote port
51                 |  |  +---------- Remote address
52                 |  +------------- Backend display name
53                 +---------------- Connection file descriptor
54
55       BackendReuse - Backend connection put up for reuse
56              Logged when a backend connection is put up for reuse by a  later
57              connection.
58
59              The format is:
60
61                 %d %s
62                 |  |
63                 |  +- Backend display name
64                 +---- Connection file descriptor
65
66       BackendStart - Backend request start
67              Start  of  backend  processing.  Logs the backend IP address and
68              port number.
69
70              The format is:
71
72                 %s %s
73                 |  |
74                 |  +- Backend Port number
75                 +---- Backend IP4/6 address
76
77                 NOTE: This tag is currently not in use in the Varnish log.
78                 It is mentioned here to document legacy versions of the log,
79                 or reserved for possible use in future versions.
80
81       Backend_health - Backend health check
82              The result of a backend health probe.
83
84              The format is:
85
86                 %s %s %s %s %u %u %u %f %f %s
87                 |  |  |  |  |  |  |  |  |  |
88                 |  |  |  |  |  |  |  |  |  +- Probe HTTP response / error information
89                 |  |  |  |  |  |  |  |  +---- Average response time
90                 |  |  |  |  |  |  |  +------- Response time
91                 |  |  |  |  |  |  +---------- Probe window size
92                 |  |  |  |  |  +------------- Probe threshold level
93                 |  |  |  |  +---------------- Number of good probes in window
94                 |  |  |  +------------------- Probe window bits
95                 |  |  +---------------------- "healthy" or "sick"
96                 |  +------------------------- "Back", "Still" or "Went"
97                 +---------------------------- Backend name
98
99              Probe window bits are:
100
101                 '4': Good IPv4
102                 '6': Good IPv6
103                 'U': Good UNIX
104                 'x': Error Xmit
105                 'X': Good Xmit
106                 'r': Error Recv
107                 'R': Good Recv
108                 'H': Happy
109
110       Begin - Marks the start of a VXID
111              The first record of a VXID transaction.
112
113              The format is:
114
115                 %s %d %s
116                 |  |  |
117                 |  |  +- Reason
118                 |  +---- Parent vxid
119                 +------- Type ("sess", "req" or "bereq")
120
121       BereqAcct - Backend request accounting
122              Contains byte counters from backend request processing.
123
124              The format is:
125
126                 %d %d %d %d %d %d
127                 |  |  |  |  |  |
128                 |  |  |  |  |  +- Total bytes received
129                 |  |  |  |  +---- Body bytes received
130                 |  |  |  +------- Header bytes received
131                 |  |  +---------- Total bytes transmitted
132                 |  +------------- Body bytes transmitted
133                 +---------------- Header bytes transmitted
134
135       BereqHeader - Backend request header
136              HTTP header contents.
137
138              The format is:
139
140                 %s: %s
141                 |   |
142                 |   +- Header value
143                 +----- Header name
144
145       BereqMethod - Backend request method
146              The HTTP request method used.
147
148       BereqProtocol - Backend request protocol
149              The HTTP protocol version information.
150
151       BereqURL - Backend request URL
152              The HTTP request URL.
153
154       BerespHeader - Backend response header
155              HTTP header contents.
156
157              The format is:
158
159                 %s: %s
160                 |   |
161                 |   +- Header value
162                 +----- Header name
163
164       BerespProtocol - Backend response protocol
165              The HTTP protocol version information.
166
167       BerespReason - Backend response response
168              The HTTP response string received.
169
170       BerespStatus - Backend response status
171              The HTTP status code received.
172
173       BogoHeader - Bogus HTTP received
174              Contains the first 20 characters of  received  HTTP  headers  we
175              could   not  make  sense  of.   Applies  to  both  req.http  and
176              beresp.http.
177
178       CLI - CLI communication
179              CLI communication between varnishd master and child process.
180
181       Debug - Debug messages
182              Debug messages can normally be ignored, but are sometimes  help‐
183              ful  during  trouble-shooting.   Most  debug  messages  must  be
184              explicitly enabled with parameters.
185
186              Debug messages may be added, changed or  removed  without  prior
187              notice and shouldn't be considered stable.
188
189              NB: This log record is masked by default.
190
191       ESI_xmlerror - ESI parser error or warning message
192              An  error  or  warning  was  generated  during parsing of an ESI
193              object. The log record describes the problem encountered.
194
195       End - Marks the end of a VXID
196              The last record of a VXID transaction.
197
198       Error - Error messages
199              Error messages are stuff you probably want to know.
200
201       ExpBan - Object evicted due to ban
202              Logs the VXID when an object is banned.
203
204       ExpKill - Object expiry event
205              Logs events related to object expiry. The events are:
206
207              EXP_Rearm
208                     Logged when the expiry time of an object changes.
209
210              EXP_Inbox
211                     Logged when the expiry thread picks an  object  from  the
212                     inbox for processing.
213
214              EXP_Kill
215                     Logged  when  the  expiry thread kills an object from the
216                     inbox.
217
218              EXP_When
219                     Logged when the expiry thread moves an object on the bin‐
220                     heap.
221
222              EXP_Expired
223                     Logged when the expiry thread expires an object.
224
225              LRU_Cand
226                     Logged when an object is evaluated for LRU force expiry.
227
228              LRU    Logged when an object is force expired due to LRU.
229
230              LRU_Fail
231                     Logged when no suitable candidate object is found for LRU
232                     force expiry.
233
234              The format is:
235
236                 EXP_Rearm p=%p E=%f e=%f f=0x%x
237                 EXP_Inbox p=%p e=%f f=0x%x
238                 EXP_Kill p=%p e=%f f=0x%x
239                 EXP_When p=%p e=%f f=0x%x
240                 EXP_Expired x=%u t=%f
241                 LRU_Cand p=%p f=0x%x r=%d
242                 LRU x=%u
243                 LRU_Fail
244
245                 Legend:
246                 p=%p         Objcore pointer
247                 t=%f         Remaining TTL (s)
248                 e=%f         Expiry time (unix epoch)
249                 E=%f         Old expiry time (unix epoch)
250                 f=0x%x       Objcore flags
251                 r=%d         Objcore refcount
252                 x=%u         Object VXID
253
254       FetchError - Error while fetching object
255              Logs the error message of a failed fetch operation.
256
257              Error messages should be self-explanatory, yet the http  connec‐
258              tion(HTC) class of errors is reported with these symbols:
259
260                 · junk (-5): Received unexpected data
261
262                 · close (-4): Connection closed
263
264                 · timeout (-3): Timed out
265
266                 · overflow (-2): Buffer/workspace too small
267
268                 · eof (-1): Unexpected end of input
269
270                 · empty (0): Empty response
271
272                 · more (1): More data required
273
274                 · complete (2): Data complete (no error)
275
276                 · idle (3): Connection was closed while idle
277
278              Notice that some HTC errors are never emitted.
279
280       Fetch_Body - Body fetched from backend
281              Ready to fetch body from backend.
282
283              The format is:
284
285                 %d (%s) %s
286                 |   |    |
287                 |   |    +---- 'stream' or '-'
288                 |   +--------- Text description of body fetch mode
289                 +------------- Body fetch mode
290
291       Filters - Body filters
292              List of filters applied to the body
293
294       Gzip - G(un)zip performed on object
295              A  Gzip  record  is  emitted for each instance of gzip or gunzip
296              work performed. Worst case, an ESI transaction stored in gzip'ed
297              objects but delivered gunziped, will run into many of these.
298
299              The format is:
300
301                 %c %c %c %d %d %d %d %d
302                 |  |  |  |  |  |  |  |
303                 |  |  |  |  |  |  |  +- Bit length of compressed data
304                 |  |  |  |  |  |  +---- Bit location of 'last' bit
305                 |  |  |  |  |  +------- Bit location of first deflate block
306                 |  |  |  |  +---------- Bytes output
307                 |  |  |  +------------- Bytes input
308                 |  |  +---------------- 'E': ESI, '-': Plain object
309                 |  +------------------- 'F': Fetch, 'D': Deliver
310                 +---------------------- 'G': Gzip, 'U': Gunzip, 'u': Gunzip-test
311
312              Examples:
313
314                 U F E 182 159 80 80 1392
315                 G F E 159 173 80 1304 1314
316
317       H2RxBody - Received HTTP2 frame body
318              Binary data
319
320       H2RxHdr - Received HTTP2 frame header
321              Binary data
322
323       H2TxBody - Transmitted HTTP2 frame body
324              Binary data
325
326       H2TxHdr - Transmitted HTTP2 frame header
327              Binary data
328
329       Hash - Value added to hash
330              This value was added to the object lookup hash.
331
332              NB: This log record is masked by default.
333
334       Hit - Hit object in cache
335              Object looked up in cache.
336
337              The format is:
338
339                 %u %f %f %f
340                 |  |  |  |
341                 |  |  |  +- Keep period
342                 |  |  +---- Grace period
343                 |  +------- Remaining TTL
344                 +---------- VXID of the object
345
346       HitMiss - Hit for miss object in cache.
347              Hit-for-miss object looked up in cache.
348
349              The format is:
350
351                 %u %f
352                 |  |
353                 |  +- Remaining TTL
354                 +---- VXID of the object
355
356       HitPass - Hit for pass object in cache.
357              Hit-for-pass object looked up in cache.
358
359              The format is:
360
361                 %u %f
362                 |  |
363                 |  +- Remaining TTL
364                 +---- VXID of the object
365
366       HttpGarbage - Unparseable HTTP request
367              Logs the content of unparseable HTTP requests.
368
369       Length - Size of object body
370              Logs the size of a fetch object body.
371
372       Link - Links to a child VXID
373              Links this VXID to any child VXID it initiates.
374
375              The format is:
376
377                 %s %d %s
378                 |  |  |
379                 |  |  +- Reason
380                 |  +---- Child vxid
381                 +------- Child type ("req" or "bereq")
382
383       LostHeader - Failed attempt to set HTTP header
384              Logs  the  header  name of a failed HTTP header operation due to
385              resource exhaustion or configured limits.
386
387       ObjHeader - Object header
388              HTTP header contents.
389
390              The format is:
391
392                 %s: %s
393                 |   |
394                 |   +- Header value
395                 +----- Header name
396
397       ObjProtocol - Object protocol
398              The HTTP protocol version information.
399
400       ObjReason - Object response
401              The HTTP response string received.
402
403       ObjStatus - Object status
404              The HTTP status code received.
405
406       PipeAcct - Pipe byte counts
407              Contains byte counters for pipe sessions.
408
409              The format is:
410
411                 %d %d %d %d
412                 |  |  |  |
413                 |  |  |  +------- Piped bytes to client
414                 |  |  +---------- Piped bytes from client
415                 |  +------------- Backend request headers
416                 +---------------- Client request headers
417
418       Proxy - PROXY protocol information
419              PROXY protocol information.
420
421              The format is:
422
423                 %d %s %d %s %d
424                 |  |  |  |  |
425                 |  |  |  |  +- server port
426                 |  |  |  +---- server ip
427                 |  |  +------- client port
428                 |  +---------- client ip
429                 +------------- PROXY protocol version
430
431                 All fields are "local" for PROXY local connections (command 0x0)
432
433       ProxyGarbage - Unparseable PROXY request
434              A PROXY protocol header was unparseable.
435
436       ReqAcct - Request handling byte counts
437              Contains byte counts for the request handling.  The  body  bytes
438              count  includes  transmission  overhead  (ie: chunked encoding).
439              ESI sub-requests show the body bytes this ESI fragment including
440              any subfragments contributed to the top level request.  The for‐
441              mat is:
442
443                 %d %d %d %d %d %d
444                 |  |  |  |  |  |
445                 |  |  |  |  |  +- Total bytes transmitted
446                 |  |  |  |  +---- Body bytes transmitted
447                 |  |  |  +------- Header bytes transmitted
448                 |  |  +---------- Total bytes received
449                 |  +------------- Body bytes received
450                 +---------------- Header bytes received
451
452       ReqHeader - Client request header
453              HTTP header contents.
454
455              The format is:
456
457                 %s: %s
458                 |   |
459                 |   +- Header value
460                 +----- Header name
461
462       ReqMethod - Client request method
463              The HTTP request method used.
464
465       ReqProtocol - Client request protocol
466              The HTTP protocol version information.
467
468       ReqStart - Client request start
469              Start of request processing. Logs the client address, port  num‐
470              ber   and listener endpoint name (from the -a command-line argu‐
471              ment).
472
473              The format is:
474
475                 %s %s %s
476                 |  |  |
477                 |  |  +-- Listener name (from -a)
478                 |  +----- Client Port number (0 for Unix domain sockets)
479                 +-------- Client IP4/6 address (0.0.0.0 for UDS)
480
481       ReqURL - Client request URL
482              The HTTP request URL.
483
484       RespHeader - Client response header
485              HTTP header contents.
486
487              The format is:
488
489                 %s: %s
490                 |   |
491                 |   +- Header value
492                 +----- Header name
493
494       RespProtocol - Client response protocol
495              The HTTP protocol version information.
496
497       RespReason - Client response response
498              The HTTP response string received.
499
500       RespStatus - Client response status
501              The HTTP status code received.
502
503       SessClose - Client connection closed
504              SessClose is the last record for any client connection.
505
506              The format is:
507
508                 %s %f
509                 |  |
510                 |  +- How long the session was open
511                 +---- Why the connection closed
512
513       SessError - Client connection accept failed
514              Accepting a client connection has failed.
515
516              The format is:
517
518                 %s %s %s %d %d %s
519                 |  |  |  |  |  |
520                 |  |  |  |  |  +- Detailed error message
521                 |  |  |  |  +---- Error Number (errno) from accept(2)
522                 |  |  |  +------- File descriptor number
523                 |  |  +---------- Local TCP port / 0 for UDS
524                 |  +------------- Local IPv4/6 address / 0.0.0.0 for UDS
525                 +---------------- Socket name (from -a argument)
526
527       SessOpen - Client connection opened
528              The first record for a client connection, with  the  socket-end‐
529              points of the connection.
530
531              The format is:
532
533                 %s %d %s %s %s %d
534                 |  |  |  |  |  |
535                 |  |  |  |  |  +- File descriptor number
536                 |  |  |  |  +---- Local TCP port / 0 for UDS
537                 |  |  |  +------- Local IPv4/6 address / 0.0.0.0 for UDS
538                 |  |  +---------- Socket name (from -a argument)
539                 |  +------------- Remote TCP port / 0 for UDS
540                 +---------------- Remote IPv4/6 address / 0.0.0.0 for UDS
541
542       Storage - Where object is stored
543              Type and name of the storage backend the object is stored in.
544
545              The format is:
546
547                 %s %s
548                 |  |
549                 |  +- Name of storage backend
550                 +---- Type ("malloc", "file", "persistent" etc.)
551
552       TTL - TTL set on object
553              A  TTL  record is emitted whenever the ttl, grace or keep values
554              for an object is set as well as whether the object is  cacheable
555              or not.
556
557              The format is:
558
559                 %s %d %d %d %d [ %d %d %u %u ] %s
560                 |  |  |  |  |    |  |  |  |    |
561                 |  |  |  |  |    |  |  |  |    +- "cacheable" or "uncacheable"
562                 |  |  |  |  |    |  |  |  +------ Max-Age from Cache-Control header
563                 |  |  |  |  |    |  |  +--------- Expires header
564                 |  |  |  |  |    |  +------------ Date header
565                 |  |  |  |  |    +--------------- Age (incl Age: header value)
566                 |  |  |  |  +-------------------- Reference time for TTL
567                 |  |  |  +----------------------- Keep
568                 |  |  +-------------------------- Grace
569                 |  +----------------------------- TTL
570                 +-------------------------------- "RFC", "VCL" or "HFP"
571
572              The four optional fields are only present in "RFC" headers.
573
574              Examples:
575
576                 RFC 60 10 -1 1312966109 1312966109 1312966109 0 60 cacheable
577                 VCL 120 10 0 1312966111 uncacheable
578                 HFP 2 0 0 1312966113 uncacheable
579
580       Timestamp - Timing information
581              Contains timing information for the Varnish worker threads.
582
583              Time  stamps  are  issued by Varnish on certain events, and show
584              the absolute time of the event, the time spent since  the  start
585              of  the  work  unit, and the time spent since the last timestamp
586              was logged. See the TIMESTAMPS  section  below  for  information
587              about the individual time stamps.
588
589              The format is:
590
591                 %s: %f %f %f
592                 |   |  |  |
593                 |   |  |  +- Time since last timestamp
594                 |   |  +---- Time since start of work unit
595                 |   +------- Absolute time of event
596                 +----------- Event label
597
598       VCL_Error - VCL execution error message
599              Logs error messages generated during VCL execution.
600
601       VCL_Log - Log statement from VCL
602              User generated log messages insert from VCL through std.log()
603
604       VCL_acl - VCL ACL check results
605              Logs VCL ACL evaluation results.
606
607       VCL_call - VCL method called
608              Logs the VCL method name when a VCL method is called.
609
610       VCL_return - VCL method return value
611              Logs the VCL method terminating statement.
612
613       VCL_trace - VCL trace data
614              Logs VCL execution trace data.
615
616              The format is:
617
618                 %s %u %u.%u.%u
619                 |  |  |  |  |
620                 |  |  |  |  +- VCL program line position
621                 |  |  |  +---- VCL program line number
622                 |  |  +------- VCL program source index
623                 |  +---------- VCL trace point index
624                 +------------- VCL configname
625
626              NB: This log record is masked by default.
627
628       VCL_use - VCL in use
629              Records the name of the VCL being used.
630
631              The format is:
632
633                 %s [ %s %s ]
634                 |    |  |
635                 |    |  +- Name of label used to find it
636                 |    +---- "via"
637                 +--------- Name of VCL put in use
638
639       VSL - VSL API warnings and error message
640              Warnings and error messages generated by the VSL API while read‐
641              ing the shared memory log.
642
643       VfpAcct - Fetch filter accounting
644              Contains name of VFP and statistics.
645
646              The format is:
647
648                 %s %d %d
649                 |  |  |
650                 |  |  +- Total bytes produced
651                 |  +---- Number of calls made
652                 +------- Name of filter
653
654              NB: This log record is masked by default.
655
656       Witness - Lock order witness records
657              Diagnostic recording of locking order.
658
659       WorkThread - Logs thread start/stop events
660              Logs worker thread creation and termination events.
661
662              The format is:
663
664                 %p %s
665                 |  |
666                 |  +- [start|end]
667                 +---- Worker struct pointer
668
669              NB: This log record is masked by default.
670

TIMESTAMPS

672       Timestamps are inserted in the log on completing certain events  during
673       the  worker  thread's task handling. The timestamps has a label showing
674       which event was completed. The reported fields show the  absolute  time
675       of  the  event, the time spent since the start of the task and the time
676       spent since the last timestamp was logged.
677
678       The timestamps logged automatically by Varnish are inserted after  com‐
679       pleting  events  that  are  expected to have delays (e.g. network IO or
680       spending time on a waitinglist). Timestamps can also be  inserted  from
681       VCL  using  the  std.timestamp() method. If one is doing time consuming
682       tasks in the VCL configuration, it's a good idea  to  log  a  timestamp
683       after completing that task. This keeps the timing information in subse‐
684       quent timestamps from including the time spent on the VCL event.
685
686   Request handling timestamps
687       Start  The  start  of  request  processing  (first  byte  received   or
688              restart).
689
690       Req    Complete client request received.
691
692       ReqBody
693              Client  request  body  processed (discarded, cached or passed to
694              the backend).
695
696       Waitinglist
697              Came off waitinglist.
698
699       Fetch  Fetch processing  finished  (completely  fetched  or  ready  for
700              streaming).
701
702       Process
703              Processing finished, ready to deliver the client response.
704
705       Resp   Delivery of response to the client finished.
706
707       Restart
708              Client request is being restarted.
709
710   Pipe handling timestamps
711       Pipe   Opened a pipe to the backend and forwarded the request.
712
713       PipeSess
714              The pipe session has finished.
715
716   Backend fetch timestamps
717       Start  Start of the backend fetch processing.
718
719       Bereq  Backend request sent.
720
721       Beresp Backend response headers received.
722
723       BerespBody
724              Backend response body received.
725
726       Retry  Backend request is being retried.
727
728       Error  Backend request failed to vcl_backend_error.
729

HISTORY

731       This  document  was  initially  written by Poul-Henning Kamp, and later
732       updated by Martin Blix Grydeland.
733

SEE ALSO

735       · varnishhist(1)
736
737       · varnishlog(1)
738
739       · varnishncsa(1)
740
741       · varnishtop(1)
742
744       This document is licensed under the same licence as Varnish itself. See
745       LICENCE for details.
746
747       · Copyright (c) 2006 Verdens Gang AS
748
749       · Copyright (c) 2006-2015 Varnish Software AS
750
751
752
753
754                                                                        VSL(7)
Impressum