1VARNISHLOG(1) VARNISHLOG(1)
2
3
4
6 varnishlog - Display Varnish logs
7
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 [-t <seconds|off>] [-T <seconds>] [-v] [-V] [-w <filename>] [-x
13 <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 -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 -t <seconds|off>
84 Timeout before returning error on initial VSM connection. If set
85 the VSM connection is retried every 0.5 seconds for this many
86 seconds. If zero the connection is attempted only once and will
87 fail immediately if unsuccessful. If set to "off", the connec‐
88 tion will not fail, allowing the utility to start and wait inde‐
89 finetely for the Varnish instance to appear. Defaults to 5 sec‐
90 onds.
91
92 -T <seconds>
93 Sets the transaction timeout in seconds. This defines the maxi‐
94 mum number of seconds elapsed between a Begin tag and the End
95 tag. If the timeout expires, a warning record is synthesized and
96 the transaction is force completed. Defaults to 120 seconds.
97
98 -v Use verbose output on record set printing, giving the VXID on
99 every log line. Without this option, the VXID will only be given
100 on the header of that transaction.
101
102 -V Print version information and exit.
103
104 -w <filename>
105 Redirect output to file. The file will be overwritten unless the
106 -a option was specified. If the application receives a SIGHUP in
107 daemon mode the file will be reopened allowing the old one to
108 be rotated away. The file can then be read by varnishlog and
109 other tools with the -r option, unless the -A option was speci‐
110 fied. This option is required when running in daemon mode.
111
112 -x <taglist>
113 Exclude log records of these tags in output. Taglist is a
114 comma-separated list of tag globs. Multiple -x options may be
115 given.
116
117 -X <[taglist:]regex>
118 Exclude by regex matching. Do not output records matching
119 taglist and regular expression. Applies to any tag if taglist is
120 absent. Multiple -X options may be given.
121
122 --optstring
123 Print the optstring parameter to getopt(3) to help writing wrap‐
124 per scripts.
125
127 · SIGHUP
128
129 Rotate the log file (see -w option)
130
131 · SIGUSR1
132
133 Flush any outstanding transactions
134
136 · varnishd(1)
137
138 · varnishhist(1)
139
140 · varnishncsa(1)
141
142 · varnishstat(1)
143
144 · varnishtop(1)
145
146 · vsl(7)
147
148 · vsl-query(7)
149
151 The varnishlog utility was developed by Poul-Henning Kamp <‐
152 phk@phk.freebsd.dk> in cooperation with Verdens Gang AS and Varnish
153 Software AS. This manual page was initially written by Dag-Erling
154 Smørgrav, and later updated by Per Buer and Martin Blix Grydeland.
155
157 This document is licensed under the same licence as Varnish itself. See
158 LICENCE for details.
159
160 · Copyright (c) 2006 Verdens Gang AS
161
162 · Copyright (c) 2006-2015 Varnish Software AS
163
164
165
166
167 VARNISHLOG(1)