1VARNISHLOG(1) VARNISHLOG(1)
2
3
4
6 varnishlog - Display Varnish logs
7
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
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 -E Display ESI transactions and other client transactions.
37
38 -g <session|request|vxid|raw>
39 The grouping of the log records. The default is to group by
40 vxid.
41
42 -h Print program usage and exit
43
44 -i <taglist>
45 Include log records of these tags in output. Taglist is a
46 comma-separated list of tag globs. Multiple -i options may be
47 given.
48
49 If a tag include option is the first of any tag selection op‐
50 tions, all tags are first marked excluded.
51
52 -I <[taglist:]regex>
53 Include by regex matching. Output only records matching taglist
54 and regular expression. Applies to any tag if taglist is absent.
55 Multiple -I options may be given.
56
57 If a tag include option is the first of any tag selection op‐
58 tions, all tags are first marked excluded.
59
60 -k <num>
61 Process this number of matching log transactions before exiting.
62
63 -L <limit>
64 Sets the upper limit of incomplete transactions kept before the
65 oldest transaction is force completed. A warning record is syn‐
66 thesized when this happens. This setting keeps an upper bound on
67 the memory usage of running queries. Defaults to 1000 transac‐
68 tions.
69
70 -n <dir>
71 Specify the varnishd working directory (also known as instance
72 name) to get logs from. If -n is not specified, the host name is
73 used.
74
75 -P <file>
76 Write the process' PID to the specified file.
77
78 -Q <file>
79 Specifies the file containing the VSL query to use. When multi‐
80 ple -Q or -q options are specified, all queries are considered
81 as if the 'or' operator was used to combine them.
82
83 -q <query>
84 Specifies the VSL query to use. When multiple -q or -Q options
85 are specified, all queries are considered as if the 'or' opera‐
86 tor was used to combine them.
87
88 -r <filename>
89 Read log in binary file format from this file. The file can be
90 created with varnishlog -w filename.
91
92 -R <limit[/duration]>
93 Restrict the output to the specified limit. Transactions exceed‐
94 ing the limit will be suppressed. The limit is specified as the
95 maximum number of transactions (with respect to the chosen
96 grouping method) and an optional time period. If no duration is
97 specified, a default of s is used. The duration field can be
98 formatted as in VCL (e.g. -R 10/2m) or as a simple time period
99 without the prefix (e.g. -R 5/m). When in -g raw grouping mode,
100 this setting can not be used alongside -i, -I, -x or -X, and we
101 advise using -q instead.
102
103 -t <seconds|off>
104 Timeout before returning error on initial VSM connection. If set
105 the VSM connection is retried every 0.5 seconds for this many
106 seconds. If zero the connection is attempted only once and will
107 fail immediately if unsuccessful. If set to "off", the connec‐
108 tion will not fail, allowing the utility to start and wait inde‐
109 finetely for the Varnish instance to appear. Defaults to 5 sec‐
110 onds.
111
112 -T <seconds>
113 Sets the transaction timeout in seconds. This defines the maxi‐
114 mum number of seconds elapsed between a Begin tag and the End
115 tag. If the timeout expires, a warning record is synthesized and
116 the transaction is force completed. Defaults to 120 seconds.
117
118 -u When writing output to a file with the -w option, output data is
119 not buffered.
120
121 -v Use verbose output on record set printing, giving the VXID on
122 every log line. Without this option, the VXID will only be given
123 on the header of that transaction.
124
125 -V Print version information and exit.
126
127 -w <filename>
128 Redirect output to file. The file will be overwritten unless the
129 -a option was specified. If the application receives a SIGHUP in
130 daemon mode the file will be reopened allowing the old one to
131 be rotated away. The file can then be read by varnishlog and
132 other tools with the -r option, unless the -A option was speci‐
133 fied. This option is required when running in daemon mode.
134
135 -x <taglist>
136 Exclude log records of these tags in output. Taglist is a
137 comma-separated list of tag globs. Multiple -x options may be
138 given.
139
140 -X <[taglist:]regex>
141 Exclude by regex matching. Do not output records matching
142 taglist and regular expression. Applies to any tag if taglist is
143 absent. Multiple -X options may be given.
144
145 --optstring
146 Print the optstring parameter to getopt(3) to help writing wrap‐
147 per scripts.
148
150 • SIGHUP
151
152 Rotate the log file (see -w option) in daemon mode, abort the loop
153 and die gracefully when running in the foreground.
154
155 • SIGUSR1
156
157 Flush any outstanding transactions
158
160 • varnishd(1)
161
162 • varnishhist(1)
163
164 • varnishncsa(1)
165
166 • varnishstat(1)
167
168 • varnishtop(1)
169
170 • vsl(7)
171
172 • vsl-query(7)
173
175 The varnishlog utility was developed by Poul-Henning Kamp <‐
176 phk@phk.freebsd.dk> in cooperation with Verdens Gang AS and Varnish
177 Software AS. This manual page was initially written by Dag-Erling
178 Smørgrav, and later updated by Per Buer and Martin Blix Grydeland.
179
181 This document is licensed under the same licence as Varnish itself. See
182 LICENCE for details.
183
184 • Copyright (c) 2006 Verdens Gang AS
185
186 • Copyright (c) 2006-2015 Varnish Software AS
187
188
189
190
191 VARNISHLOG(1)