1VARNISHLOG(1) BSD General Commands Manual VARNISHLOG(1)
2
4 varnishlog — Display Varnish logs
5
7 varnishlog [-a] [-b] [-C] [-c] [-D] [-d] [-I regex] [-i tag]
8 [-n varnish_name] [-o] [-P file] [-r file] [-V] [-w file]
9 [-X regex] [-x tag] [tag regex]
10
12 The varnishlog utility reads and presents varnishd(1) shared memory logs.
13
14 The following options are available:
15
16 -a When writing to a file, append to it rather than overwrite
17 it.
18
19 -b Include log entries which result from communication with a
20 backend server. If neither -b nor -c is specified,
21 varnishlog acts as if they both were.
22
23 -C Ignore case when matching regular expressions.
24
25 -c Include log entries which result from communication with a
26 client. If neither -b nor -c is specified, varnishlog acts
27 as if they both were.
28
29 -D Daemonize.
30
31 -d Process old log entries on startup. Normally, varnishlog
32 will only process entries which are written to the log after
33 it starts.
34
35 -I regex Include log entries which match the specified regular expres‐
36 sion. If neither -I nor -i is specified, all log entries are
37 included.
38
39 -i tag Include log entries with the specified tag. If neither -I
40 nor -i is specified, all log entries are included.
41
42 -n Specifies the name of the varnishd instance to get logs from.
43 If -n is not specified, the host name is used.
44
45 -o Group log entries by request ID. This has no effect when
46 writing to a file using the -w option.
47
48 -P file Write the process's PID to the specified file.
49
50 -r file Read log entries from file instead of shared memory.
51
52 -V Display the version number and exit.
53
54 -w file Write log entries to file instead of displaying them. The
55 file will be overwritten unless the -a option was specified.
56
57 If varnishlog receives a SIGHUP while writing to a file, it
58 will reopen the file, allowing the old one to be rotated
59 away.
60
61 -X regex Exclude log entries which match the specified regular expres‐
62 sion.
63
64 -x tag Exclude log entries with the specified tag.
65
66 If the -o option was specified, an additional tag and regex may be speci‐
67 fied to select only requests which generated a log entry with the given
68 tag whose contents match the given regex.
69
71 The following log entry tags are currently defined:
72
73 Backend
74
75 BackendClose
76
77 BackendOpen
78
79 BackendReuse
80
81 BackendXID
82
83 CLI
84
85 ClientAddr
86
87 Debug
88
89 Error
90
91 ExpBan
92
93 ExpKill
94
95 ExpPick
96
97 Hit
98
99 HitPass
100
101 HttpError
102
103 HttpGarbage
104
105 Length
106
107 ObjHeader
108
109 ObjLostHeader
110
111 ObjProtocol
112
113 ObjRequest
114
115 ObjResponse
116
117 ObjStatus
118
119 ObjURL
120
121 ReqEnd
122
123 ReqStart
124
125 RxHeader
126
127 RxLostHeader
128
129 RxProtocol
130
131 RxRequest
132
133 RxResponse
134
135 RxStatus
136
137 RxURL
138
139 SessionClose
140
141 SessionOpen
142
143 StatAddr
144
145 StatSess
146
147 TTL
148
149 TxHeader
150
151 TxLostHeader
152
153 TxProtocol
154
155 TxRequest
156
157 TxResponse
158
159 TxStatus
160
161 TxURL
162
163 VCL_acl
164
165 VCL_call
166
167 VCL_return
168
169 VCL_trace
170
171 WorkThread
172
174 The following command line simply copies all log entries to a log file:
175
176 $ varnishlog -w /var/log/varnish.log
177
178 The following command line reads that same log file and displays requests
179 for the front page:
180
181 $ varnishlog -r /var/log/varnish.log -c -o RxURL '^/$'
182
184 varnishd(1), varnishhist(1), varnishncsa(1), varnishstat(1),
185 varnishtop(1)
186
188 The varnishlog utility was developed by Poul-Henning Kamp
189 <phk@phk.freebsd.dk> in cooperation with Verdens Gang AS and Linpro AS.
190 This manual page was written by Dag-Erling Smørgrav <des@linpro.no>.
191
192BSD November 8, 2007 BSD