Commit 3673967c authored by Poul-Henning Kamp's avatar Poul-Henning Kamp
parents 4c1e8266 59a3b914
_reference-varnishlog:
========== ==========
varnishlog varnishlog
========== ==========
......
...@@ -31,9 +31,11 @@ Tool: varnishlog ...@@ -31,9 +31,11 @@ Tool: varnishlog
~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~
When you have identified the an URL which is frequently sent to the When you have identified the an URL which is frequently sent to the
backend you can use varnishlog to have a look at the whole request. backend you can use varnishlog to have a look at the request.
``varnishlog -c -m 'RxURL:^/foo/bar`` will give the whole (-o) ``varnishlog -c -m 'RxURL:^/foo/bar`` will show you the requests
requests coming from the client (-c) matching /foo/bar. coming from the client (-c) matching /foo/bar.
For more information on how varnishlog works please see :ref:`tutorial-logging`.
For extended diagnostics headers, see For extended diagnostics headers, see
http://www.varnish-cache.org/trac/wiki/VCLExampleHitMissHeader http://www.varnish-cache.org/trac/wiki/VCLExampleHitMissHeader
......
.. _tutorial-logging:
Logging in Varnish Logging in Varnish
------------------ ------------------
...@@ -8,7 +9,7 @@ memory segment. When the end of the segment is reached we start over, ...@@ -8,7 +9,7 @@ memory segment. When the end of the segment is reached we start over,
overwriting old data. This is much, much faster then logging to a file overwriting old data. This is much, much faster then logging to a file
and it doesn't require disk space. and it doesn't require disk space.
The flip side is that is you forget to have program actually write the The flip side is that if you forget to have program actually write the
logs to disk they will disappear. logs to disk they will disappear.
varnishlog is one of the programs you can use to look at what Varnish varnishlog is one of the programs you can use to look at what Varnish
...@@ -59,19 +60,9 @@ want to know are: ...@@ -59,19 +60,9 @@ want to know are:
-c -c
Same as -b but for client side traffic. Same as -b but for client side traffic.
-i tag -m tag:regex
Only show lines with a certain tag. "varnishlog -i SessionOpen" Only list transactions where the tag matches a regular expression. If
will only give you new sessions. Note that the tags are case it matches you will get the whole transaction.
insensitive.
-I Regex
Filter the data through a regex and only show the matching lines. To
show all cookie headers coming from the clients:
``$ varnishlog -c -i RxHeader -I Cookie``
-o
Group log entries by request ID.
Now that Varnish seem to work OK it's time to put Varnish on port 80 Now that Varnish seem to work OK it's time to put Varnish on port 80
while we tune it. while we tune it.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment