~ubuntu-branches/debian/sid/varnish/sid

« back to all changes in this revision

Viewing changes to bin/varnishlog/varnishlog.1

  • Committer: Bazaar Package Importer
  • Author(s): Stig Sandbeck Mathisen
  • Date: 2011-03-21 10:16:07 UTC
  • mfrom: (24.1.2 experimental)
  • Revision ID: james.westby@ubuntu.com-20110321101607-528fzl583fqanas5
Tags: 2.1.5-2
Release for unstable

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
.\"-
2
 
.\" Copyright (c) 2006 Verdens Gang AS
3
 
.\" Copyright (c) 2006-2009 Linpro AS
4
 
.\" All rights reserved.
5
 
.\"
6
 
.\" Author: Dag-Erling Smørgrav <des@des.no>
7
 
.\"
8
 
.\" Redistribution and use in source and binary forms, with or without
9
 
.\" modification, are permitted provided that the following conditions
10
 
.\" are met:
11
 
.\" 1. Redistributions of source code must retain the above copyright
12
 
.\"    notice, this list of conditions and the following disclaimer.
13
 
.\" 2. Redistributions in binary form must reproduce the above copyright
14
 
.\"    notice, this list of conditions and the following disclaimer in the
15
 
.\"    documentation and/or other materials provided with the distribution.
16
 
.\"
17
 
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
18
 
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19
 
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20
 
.\" ARE DISCLAIMED.  IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE
21
 
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22
 
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23
 
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24
 
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25
 
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26
 
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27
 
.\" SUCH DAMAGE.
28
 
.\"
29
 
.\" $Id: varnishlog.1 4107 2009-06-17 05:20:34Z ssm $
30
 
.\"
31
 
.Dd March 9, 2008
32
 
.Dt VARNISHLOG 1
33
 
.Os
34
 
.Sh NAME
35
 
.Nm varnishlog
36
 
.Nd Display Varnish logs
37
 
.Sh SYNOPSIS
38
 
.Nm
39
 
.Op Fl a
40
 
.Op Fl b
41
 
.Op Fl C
42
 
.Op Fl c
43
 
.Op Fl D
44
 
.Op Fl d
45
 
.Op Fl I Ar regex
46
 
.Op Fl i Ar tag
47
 
.Op Fl k Ar keep
48
 
.Op Fl n Ar varnish_name
49
 
.Op Fl o
50
 
.Op Fl P Ar file
51
 
.Op Fl r Ar file
52
 
.Op Fl s Ar num
53
 
.Op Fl u 
54
 
.Op Fl V
55
 
.Op Fl w Ar file
56
 
.Op Fl X Ar regex
57
 
.Op Fl x Ar tag
58
 
.Op Ar tag Ar regex
59
 
.Sh DESCRIPTION
60
 
The
61
 
.Nm
62
 
utility reads and presents
63
 
.Xr varnishd 1
64
 
shared memory logs.
65
 
.Pp
66
 
The following options are available:
67
 
.Bl -tag -width Fl
68
 
.It Fl a
69
 
When writing to a file, append to it rather than overwrite it.
70
 
.It Fl b
71
 
Include log entries which result from communication with a backend
72
 
server.
73
 
If neither
74
 
.Fl b
75
 
nor
76
 
.Fl c
77
 
is specified,
78
 
.Nm
79
 
acts as if they both were.
80
 
.It Fl C
81
 
Ignore case when matching regular expressions.
82
 
.It Fl c
83
 
Include log entries which result from communication with a client.
84
 
If neither
85
 
.Fl b
86
 
nor
87
 
.Fl c
88
 
is specified,
89
 
.Nm
90
 
acts as if they both were.
91
 
.It Fl D
92
 
Daemonize.
93
 
.It Fl d
94
 
Process old log entries on startup.
95
 
Normally,
96
 
.Nm
97
 
will only process entries which are written to the log after it
98
 
starts.
99
 
.It Fl I Ar regex
100
 
Include log entries which match the specified regular expression.
101
 
If neither
102
 
.Fl I
103
 
nor
104
 
.Fl i
105
 
is specified, all log entries are included.
106
 
.It Fl i Ar tag
107
 
Include log entries with the specified tag.
108
 
If neither
109
 
.Fl I
110
 
nor
111
 
.Fl i
112
 
is specified, all log entries are included.
113
 
.It Fl k Ar num
114
 
Only show the first
115
 
.Nm num
116
 
log records.
117
 
.It Fl n
118
 
Specifies the name of the
119
 
.Nm varnishd
120
 
instance to get logs from.
121
 
If
122
 
.Fl n
123
 
is not specified, the host name is used.
124
 
.It Fl o
125
 
Group log entries by request ID.
126
 
This has no effect when writing to a file using the
127
 
.Fl w
128
 
option.
129
 
.It Fl P Ar file
130
 
Write the process's PID to the specified
131
 
.Ar file .
132
 
.It Fl r Ar file
133
 
Read log entries from
134
 
.Ar file
135
 
instead of shared memory.
136
 
.It Fl s Ar num
137
 
Skip the first
138
 
.Ar num
139
 
log records.
140
 
.It Fl u
141
 
Unbuffered output.
142
 
.It Fl V
143
 
Display the version number and exit.
144
 
.It Fl w Ar file
145
 
Write log entries to
146
 
.Ar file
147
 
instead of displaying them.
148
 
The file will be overwritten unless the
149
 
.Fl a
150
 
option was specified.
151
 
.Pp
152
 
If
153
 
.Nm
154
 
receives a
155
 
.Dv SIGHUP
156
 
while writing to a file, it will reopen the file, allowing the old one
157
 
to be rotated away.
158
 
.It Fl X Ar regex
159
 
Exclude log entries which match the specified regular expression.
160
 
.It Fl x Ar tag
161
 
Exclude log entries with the specified tag.
162
 
.El
163
 
.Pp
164
 
If the
165
 
.Fl o
166
 
option was specified, an additional
167
 
.Ar tag
168
 
and
169
 
.Ar regex
170
 
may be specified to select only requests which generated a log entry
171
 
with the given
172
 
.Ar tag
173
 
whose contents match the given
174
 
.Ar regex .
175
 
.Sh TAGS
176
 
The following log entry tags are currently defined:
177
 
.\" keep in sync with include/shmlog_tags.h
178
 
.\" XXX add descriptions
179
 
.Bl -tag -width 16
180
 
.It Dv Backend
181
 
.It Dv BackendClose
182
 
.It Dv BackendOpen
183
 
.It Dv BackendReuse
184
 
.It Dv BackendXID
185
 
.It Dv CLI
186
 
.It Dv ClientAddr
187
 
.It Dv Debug
188
 
.It Dv Error
189
 
.It Dv ExpBan
190
 
.It Dv ExpKill
191
 
.It Dv ExpPick
192
 
.It Dv Hit
193
 
.It Dv HitPass
194
 
.It Dv HttpError
195
 
.It Dv HttpGarbage
196
 
.It Dv Length
197
 
.It Dv ObjHeader
198
 
.It Dv ObjLostHeader
199
 
.It Dv ObjProtocol
200
 
.It Dv ObjRequest
201
 
.It Dv ObjResponse
202
 
.It Dv ObjStatus
203
 
.It Dv ObjURL
204
 
.It Dv ReqEnd
205
 
.It Dv ReqStart
206
 
.It Dv RxHeader
207
 
.It Dv RxLostHeader
208
 
.It Dv RxProtocol
209
 
.It Dv RxRequest
210
 
.It Dv RxResponse
211
 
.It Dv RxStatus
212
 
.It Dv RxURL
213
 
.It Dv SessionClose
214
 
.It Dv SessionOpen
215
 
.It Dv StatAddr
216
 
.It Dv StatSess
217
 
.It Dv TTL
218
 
.It Dv TxHeader
219
 
.It Dv TxLostHeader
220
 
.It Dv TxProtocol
221
 
.It Dv TxRequest
222
 
.It Dv TxResponse
223
 
.It Dv TxStatus
224
 
.It Dv TxURL
225
 
.It Dv VCL_acl
226
 
.It Dv VCL_call
227
 
.It Dv VCL_return
228
 
.It Dv VCL_trace
229
 
.It Dv WorkThread
230
 
.El
231
 
.Sh EXAMPLES
232
 
The following command line simply copies all log entries to a log
233
 
file:
234
 
.Bd -literal -offset 4n
235
 
$ varnishlog \-w /var/log/varnish.log
236
 
.Ed
237
 
.Pp
238
 
The following command line reads that same log file and displays
239
 
requests for the front page:
240
 
.Bd -literal -offset 4n
241
 
$ varnishlog \-r /var/log/varnish.log \-c \-o RxURL '^/$'
242
 
.Ed
243
 
.Sh SEE ALSO
244
 
.Xr varnishd 1 ,
245
 
.Xr varnishhist 1 ,
246
 
.Xr varnishncsa 1 ,
247
 
.Xr varnishstat 1 ,
248
 
.Xr varnishtop 1
249
 
.Sh HISTORY
250
 
The
251
 
.Nm
252
 
utility was developed by
253
 
.An Poul-Henning Kamp Aq phk@phk.freebsd.dk
254
 
in cooperation with Verdens Gang AS and Linpro AS.
255
 
This manual page was written by
256
 
.An Dag-Erling Sm\(/orgrav Aq des@des.no .