1VARNISHLOG(1)                                                    VARNISHLOG(1)
2
3
4

NAME

6       varnishlog - Display Varnish logs
7

SYNOPSIS

9       varnishlog  [-a]  [-A]  [-b]  [-c] [-C] [-d] [-D] [-E] [-g <session|re‐
10       quest|vxid|raw>] [-h] [-i <taglist>] [-I <[taglist:]regex>] [-k  <num>]
11       [-L <limit>] [-n <dir>] [-P <file>] [-Q <file>] [-q <query>] [-r <file‐
12       name>] [-R <limit[/duration]>] [-t <seconds|off>] [-T  <seconds>]  [-u]
13       [-v] [-V] [-w <filename>] [-x <taglist>] [-X <[taglist:]regex>]
14

OPTIONS

16       The following options are available:
17
18       -a     When  writing  output to a file with the -w option, append to it
19              rather than overwrite it. This option has no effect without  the
20              -w option.
21
22       -A     When writing output to a file with the -w option, output data in
23              ascii format. This option has no effect without the -w option.
24
25       -b     Only display transactions and log records  coming  from  backend
26              communication.
27
28       -c     Only  display  transactions  and  log records coming from client
29              communication.
30
31       -C     Do all regular expression and string matching caseless.
32
33       -d     Process log records at the head of the log and exit.
34
35       -D     Daemonize.
36
37       -E     Display ESI transactions and other client transactions.
38
39       -g <session|request|vxid|raw>
40              The grouping of the log records. The  default  is  to  group  by
41              vxid.
42
43       -h     Print program usage and exit
44
45       -i <taglist>
46              Include  log  records  of  these  tags  in  output. Taglist is a
47              comma-separated list of tag globs. Multiple -i  options  may  be
48              given.
49
50              If  a  tag  include option is the first of any tag selection op‐
51              tions, all tags are first marked excluded.
52
53       -I <[taglist:]regex>
54              Include by regex matching. Output only records matching  taglist
55              and regular expression. Applies to any tag if taglist is absent.
56              Multiple -I options may be given.
57
58              If a tag include option is the first of any  tag  selection  op‐
59              tions, all tags are first marked excluded.
60
61       -k <num>
62              Process this number of matching log transactions before exiting.
63
64       -L <limit>
65              Sets  the upper limit of incomplete transactions kept before the
66              oldest transaction is force completed. A warning record is  syn‐
67              thesized when this happens. This setting keeps an upper bound on
68              the memory usage of running queries. Defaults to  1000  transac‐
69              tions.
70
71       -n <dir>
72              Specify  the  varnishd working directory (also known as instance
73              name) to get logs from. If -n is not specified, the host name is
74              used.
75
76       -P <file>
77              Write the process' PID to the specified file.
78
79       -Q <file>
80              Specifies  the file containing the VSL query to use. When multi‐
81              ple -Q or -q options are specified, all queries  are  considered
82              as if the 'or' operator was used to combine them.
83
84       -q <query>
85              Specifies  the  VSL query to use. When multiple -q or -Q options
86              are specified, all queries are considered as if the 'or'  opera‐
87              tor was used to combine them.
88
89       -r <filename>
90              Read  log  in binary file format from this file. The file can be
91              created with varnishlog -w filename. If the filename is -,  logs
92              are read from the standard input. and cannot work as a daemon.
93
94       -R <limit[/duration]>
95              Restrict the output to the specified limit. Transactions exceed‐
96              ing the limit will be suppressed. The limit is specified as  the
97              maximum  number  of  transactions  (with  respect  to the chosen
98              grouping method) and an optional time period. If no duration  is
99              specified,  a  default  of  s is used. The duration field can be
100              formatted as in VCL (e.g. -R 10/2m) or as a simple  time  period
101              without  the prefix (e.g. -R 5/m). When in -g raw grouping mode,
102              this setting can not be used alongside -i, -I, -x or -X, and  we
103              advise using -q instead.
104
105       -t <seconds|off>
106              Timeout before returning error on initial VSM connection. If set
107              the VSM connection is retried every 0.5 seconds  for  this  many
108              seconds.  If zero the connection is attempted only once and will
109              fail immediately if unsuccessful. If set to "off",  the  connec‐
110              tion will not fail, allowing the utility to start and wait inde‐
111              finetely for the Varnish instance to appear.  Defaults to 5 sec‐
112              onds.
113
114       -T <seconds>
115              Sets  the transaction timeout in seconds. This defines the maxi‐
116              mum number of seconds elapsed between a Begin tag  and  the  End
117              tag. If the timeout expires, a warning record is synthesized and
118              the transaction is force completed. Defaults to 120 seconds.
119
120       -u     When writing output to a file with the -w option, output data is
121              not buffered. This option has no effect without the -w option.
122
123       -v     Use  verbose  output  on record set printing, giving the VXID on
124              every log line. Without this option, the VXID will only be given
125              on the header of that transaction.
126
127       -V     Print version information and exit.
128
129       -w <filename>
130              Redirect output to file. The file will be overwritten unless the
131              -a option was specified. If the application receives a SIGHUP in
132              daemon  mode  the file will be  reopened allowing the old one to
133              be rotated away. The file can then be  read  by  varnishlog  and
134              other  tools with the -r option, unless the -A option was speci‐
135              fied. This option is required when running in  daemon  mode.  If
136              the  filename is -, varnishlog writes to the standard output and
137              cannot work as a daemon.
138
139       -x <taglist>
140              Exclude log records of  these  tags  in  output.  Taglist  is  a
141              comma-separated  list  of  tag globs. Multiple -x options may be
142              given.
143
144       -X <[taglist:]regex>
145              Exclude by  regex  matching.  Do  not  output  records  matching
146              taglist and regular expression. Applies to any tag if taglist is
147              absent. Multiple -X options may be given.
148
149       --optstring
150              Print the optstring parameter to getopt(3) to help writing wrap‐
151              per scripts.
152

SIGNALS

154       • SIGHUP
155
156         Rotate  the  log  file (see -w option) in daemon mode, abort the loop
157         and die gracefully when running in the foreground.
158
159       • SIGUSR1
160
161         Flush any outstanding transactions
162

SEE ALSO

164varnishd(1)
165
166varnishhist(1)
167
168varnishncsa(1)
169
170varnishstat(1)
171
172varnishtop(1)
173
174vsl(7)
175
176vsl-query(7)
177

HISTORY

179       The  varnishlog  utility  was  developed  by   Poul-Henning   Kamp   <‐
180       phk@phk.freebsd.dk>  in  cooperation  with  Verdens Gang AS and Varnish
181       Software AS. This manual  page  was  initially  written  by  Dag-Erling
182       Smørgrav, and later updated by Per Buer and Martin Blix Grydeland.
183
185       This document is licensed under the same licence as Varnish itself. See
186       LICENCE for details.
187
188       • Copyright (c) 2006 Verdens Gang AS
189
190       • Copyright (c) 2006-2015 Varnish Software AS
191
192
193
194
195                                                                 VARNISHLOG(1)
Impressum