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

NAME

6       varnishlog - Display Varnish logs
7

SYNOPSIS

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

SIGNALS

138       · SIGHUP
139
140         Rotate the log file (see -w option)
141
142       · SIGUSR1
143
144         Flush any outstanding transactions
145

SEE ALSO

147       · varnishd(1)
148
149       · varnishhist(1)
150
151       · varnishncsa(1)
152
153       · varnishstat(1)
154
155       · varnishtop(1)
156
157       · vsl(7)
158
159       · vsl-query(7)
160

HISTORY

162       The  varnishlog  utility  was  developed  by   Poul-Henning   Kamp   <‐
163       phk@phk.freebsd.dk>  in  cooperation  with  Verdens Gang AS and Varnish
164       Software AS. This manual  page  was  initially  written  by  Dag-Erling
165       Smørgrav, and later updated by Per Buer and Martin Blix Grydeland.
166
168       This document is licensed under the same licence as Varnish itself. See
169       LICENCE for details.
170
171       · Copyright (c) 2006 Verdens Gang AS
172
173       · Copyright (c) 2006-2015 Varnish Software AS
174
175
176
177
178                                                                 VARNISHLOG(1)
Impressum