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 <file>] [-q <query>] [-r
12       <filename>] [-R <limit[/duration]>] [-t <seconds|off>]  [-T  <seconds>]
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.
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 <file>
77              Specifies the file containing the VSL query to use. When  multi‐
78              ple  -Q  or -q options are specified, all queries are considered
79              as if the 'or' operator was used to combine them.
80
81       -q <query>
82              Specifies the VSL query to use. When multiple -q or  -Q  options
83              are  specified, all queries are considered as if the 'or' opera‐
84              tor was used to combine them.
85
86       -r <filename>
87              Read log in binary file format from this file. The file  can  be
88              created with varnishlog -w filename.
89
90       -R <limit[/duration]>
91              Restrict the output to the specified limit. Transactions exceed‐
92              ing the limit will be suppressed. The limit is specified as  the
93              maximum  number  of  transactions  (with  respect  to the chosen
94              grouping method) and an optional time period. If no duration  is
95              specified,  a  default  of  s is used. The duration field can be
96              formatted as in VCL (e.g. -R 10/2m) or as a simple  time  period
97              without  the prefix (e.g. -R 5/m). When in -g raw grouping mode,
98              this setting can not be used alongside -i, -I, -x or -X, and  we
99              advise using -q instead.
100
101       -t <seconds|off>
102              Timeout before returning error on initial VSM connection. If set
103              the VSM connection is retried every 0.5 seconds  for  this  many
104              seconds.  If zero the connection is attempted only once and will
105              fail immediately if unsuccessful. If set to "off",  the  connec‐
106              tion will not fail, allowing the utility to start and wait inde‐
107              finetely for the Varnish instance to appear.  Defaults to 5 sec‐
108              onds.
109
110       -T <seconds>
111              Sets  the transaction timeout in seconds. This defines the maxi‐
112              mum number of seconds elapsed between a Begin tag  and  the  End
113              tag. If the timeout expires, a warning record is synthesized and
114              the transaction is force completed. Defaults to 120 seconds.
115
116       -v     Use verbose output on record set printing, giving  the  VXID  on
117              every log line. Without this option, the VXID will only be given
118              on the header of that transaction.
119
120       -V     Print version information and exit.
121
122       -w <filename>
123              Redirect output to file. The file will be overwritten unless the
124              -a option was specified. If the application receives a SIGHUP in
125              daemon mode the file will be  reopened allowing the old  one  to
126              be  rotated  away.  The  file can then be read by varnishlog and
127              other tools with the -r option, unless the -A option was  speci‐
128              fied. This option is required when running in daemon mode.
129
130       -x <taglist>
131              Exclude  log  records  of  these  tags  in  output. Taglist is a
132              comma-separated list of tag globs. Multiple -x  options  may  be
133              given.
134
135       -X <[taglist:]regex>
136              Exclude  by  regex  matching.  Do  not  output  records matching
137              taglist and regular expression. Applies to any tag if taglist is
138              absent. Multiple -X options may be given.
139
140       --optstring
141              Print the optstring parameter to getopt(3) to help writing wrap‐
142              per scripts.
143

SIGNALS

145       · SIGHUP
146
147         Rotate the log file (see -w option) in daemon mode,  abort  the  loop
148         and die gracefully when running in the foreground.
149
150       · SIGUSR1
151
152         Flush any outstanding transactions
153

SEE ALSO

155       · varnishd(1)
156
157       · varnishhist(1)
158
159       · varnishncsa(1)
160
161       · varnishstat(1)
162
163       · varnishtop(1)
164
165       · vsl(7)
166
167       · vsl-query(7)
168

HISTORY

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