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

TIMESTAMPS

718       Timestamps are inserted in the log on completing certain events  during
719       the  worker  thread's task handling. The timestamps has a label showing
720       which event was completed. The reported fields show the  absolute  time
721       of  the  event, the time spent since the start of the task and the time
722       spent since the last timestamp was logged.
723
724       The timestamps logged automatically by Varnish are inserted after  com‐
725       pleting  events  that  are  expected to have delays (e.g. network IO or
726       spending time on a waitinglist). Timestamps can also be  inserted  from
727       VCL  using the std.timestamp() function. If one is doing time consuming
728       tasks in the VCL configuration, it's a good idea  to  log  a  timestamp
729       after completing that task. This keeps the timing information in subse‐
730       quent timestamps from including the time spent on the VCL event.
731
732   Request handling timestamps
733       Start  The  start  of  request  processing  (first  byte  received   or
734              restart).
735
736       Req    Complete client request received.
737
738       ReqBody
739              Client  request  body  processed (discarded, cached or passed to
740              the backend).
741
742       Waitinglist
743              Came off waitinglist.
744
745       Fetch  Fetch processing  finished  (completely  fetched  or  ready  for
746              streaming).
747
748       Process
749              Processing finished, ready to deliver the client response.
750
751       Resp   Delivery of response to the client finished.
752
753       Restart
754              Client request is being restarted.
755
756   Pipe handling timestamps
757       Pipe   Opened a pipe to the backend and forwarded the request.
758
759       PipeSess
760              The pipe session has finished.
761
762   Backend fetch timestamps
763       Start  Start of the backend fetch processing.
764
765       Bereq  Backend request sent.
766
767       Beresp Backend response headers received.
768
769       BerespBody
770              Backend response body received.
771
772       Retry  Backend request is being retried.
773
774       Error  Backend request failed to vcl_backend_error.
775

NOTICE MESSAGES

777       Notice  messages contain informational messages about the handling of a
778       request. These can be exceptional circumstances encountered that causes
779       deviation  from the normal handling. The messages are prefixed with vsl
780       for core Varnish generated messages, and VMOD authors are encouraged to
781       use vmod_<name> for their own notice messages. This matches the name of
782       the manual page where detailed  descriptions  of  notice  messages  are
783       expected.
784
785       The core messages are described below.
786
787   Conditional fetch wait for streaming object
788       The  backend  answered 304 Not Modified on a conditional fetch using an
789       object that has not yet  been  fully  fetched  as  the  stale  template
790       object.  This  can  only happen when the TTL of the object is less than
791       the time it takes to fetch it. The fetch  is  halted  until  the  stale
792       object  is  fully fetched, upon which the new object is created as nor‐
793       mal. While waiting, any grace time on  the  stale  object  will  be  in
794       effect.
795

HISTORY

797       This  document  was  initially  written by Poul-Henning Kamp, and later
798       updated by Martin Blix Grydeland.
799

SEE ALSO

801       · varnishhist(1)
802
803       · varnishlog(1)
804
805       · varnishncsa(1)
806
807       · varnishtop(1)
808
810       This document is licensed under the same licence as Varnish itself. See
811       LICENCE for details.
812
813       · Copyright (c) 2006 Verdens Gang AS
814
815       · Copyright (c) 2006-2015 Varnish Software AS
816
817
818
819
820                                                                        VSL(7)
Impressum