~ubuntu-branches/ubuntu/saucy/varnish/saucy

« back to all changes in this revision

Viewing changes to doc/sphinx/tutorial/statistics.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
.. _tutorial-statistics:
 
2
 
 
3
 
 
4
Statistics
 
5
----------
 
6
 
 
7
Now that your varnish is up and running lets have a look at how it is
 
8
doing. There are several tools that can help.
 
9
 
 
10
varnishtop
 
11
~~~~~~~~~~
 
12
 
 
13
The varnishtop utility reads the shared memory logs and presents a
 
14
continuously updated list of the most commonly occurring log entries.
 
15
 
 
16
With suitable filtering using the -I, -i, -X and -x options, it can be
 
17
used to display a ranking of requested documents, clients, user
 
18
agents, or any other information which is recorded in the log.
 
19
 
 
20
``varnishtop -i rxurl`` will show you what URLs are beeing asked for
 
21
by the client. ``varnishtop -i txurl`` will show you what your backend
 
22
is beeing asked the most. ``varnishtop -i RxHeader -I
 
23
Accept-Encoding`` will show the most popular Accept-Encoding header
 
24
the client are sendning you.
 
25
 
 
26
varnishhist
 
27
~~~~~~~~~~~
 
28
 
 
29
The varnishhist utility reads varnishd(1) shared memory logs and
 
30
presents a continuously updated histogram showing the distribution of
 
31
the last N requests by their processing.  The value of N and the
 
32
vertical scale are displayed in the top left corner.  The horizontal
 
33
scale is logarithmic.  Hits are marked with a pipe character ("|"),
 
34
and misses are marked with a hash character ("#").
 
35
 
 
36
 
 
37
varnishsizes
 
38
~~~~~~~~~~~~
 
39
 
 
40
Varnishsizes does the same as varnishhist, except it shows the size of
 
41
the objects and not the time take to complete the request. This gives
 
42
you a good overview of how big the objects you are serving are.
 
43
 
 
44
 
 
45
varnishstat
 
46
~~~~~~~~~~~
 
47
 
 
48
Varnish has lots of counters. We count misses, hits, information about
 
49
the storage, threads created, deleted objects. Just about
 
50
everything. varnishstat will dump these counters. This is useful when
 
51
tuning varnish. 
 
52
 
 
53
There are programs that can poll varnishstat regularly and make nice
 
54
graphs of these counters. One such program is Munin. Munin can be
 
55
found at http://munin-monitoring.org/ . There is a plugin for munin in
 
56
the varnish source code.
 
57