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

« back to all changes in this revision

Viewing changes to doc/sphinx/reference/varnishlog.rst

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