..
	Copyright (c) 2012-2015 Varnish Software AS
	SPDX-License-Identifier: BSD-2-Clause
	See LICENSE file for full text of license

.. _users-guide-statistics:


Statistics
----------

Vinyl Cache comes with a couple of nifty and very useful statistics generating tools that generates statistics in real time by constantly updating and presenting a specific dataset by aggregating and analyzing logdata from the shared memory logs.

.. XXX:Heavy rewrite above. benc

vinyltop
~~~~~~~~

The :ref:`vinyltop(1)` utility reads the shared memory logs and presents a
continuously updated list of the most commonly occurring log entries.

With suitable filtering using the -I, -i, -X and -x options, it can be
used to display a ranking of requested documents, clients, user
agents, or any other information which is recorded in the log.

``vinyltop -i ReqURL`` will show you what URLs are being asked for by
the client. ``vinyltop -i BereqURL`` will show you what your backend
is being asked the most. ``vinyltop -I ReqHeader:Accept-Encoding`` will
show the most popular Accept-Encoding header the client are sending you.

vinylhist
~~~~~~~~~

The :ref:`vinylhist(1)` utility reads :ref:`vinyld(1)` shared
memory logs and presents a continuously updated histogram showing the
distribution of the last N requests by their processing.
The value of N and the vertical scale are displayed in the top left
corner.  The horizontal scale is logarithmic.  Hits are marked with a
pipe character ("|"), and misses are marked with a hash character ("#").

vinylstat
~~~~~~~~~

Vinyl Cache has lots of counters. We count misses, hits, information about
the storage, threads created, deleted objects. Just about
everything. :ref:`vinylstat(1)` will dump these counters. This is useful when
tuning Vinyl Cache.

There are programs that can poll :ref:`vinylstat(1)` regularly and
make nice graphs of these counters. One such program is Munin. Munin
can be found at http://munin-monitoring.org/ . There is a plugin for
munin in the Vinyl Cache source code.
