Varnish Cache statistics

Manual section



varnishstat [-1] [-f <glob>] [-h] [-j] [-l] [-n <dir>] [-t <seconds|off>] [-V] [-x]


The varnishstat utility displays statistics from a running varnishd(1) instance.

The following options are available:


Instead of presenting a continuously updated display, print the statistics to stdout.

-f <glob>

Field inclusion glob. Use backslash to escape characters. If the argument starts with ‘^’ it is used as an exclusive glob. Multiple -f arguments may be given. Inclusive globs are accumulative and are run before exclusive ones.


Print program usage and exit


Print statistics to stdout as JSON.


Lists the available fields to use with the -f option.

-n <dir>

Specify the varnishd working directory (also known as instance name) to get logs from. If -n is not specified, the host name is used.

-t <seconds|off>

Timeout before returning error on initial VSM connection. If set the VSM connection is retried every 0.5 seconds for this many seconds. If zero the connection is attempted only once and will fail immediately if unsuccessful. If set to “off”, the connection will not fail, allowing the utility to start and wait indefinetely for the Varnish instance to appear. Defaults to 5 seconds.


Print version information and exit.


Print statistics to stdout as XML.


When neither -1, -j or -x options are given, the application starts up in curses mode. This shows a continuously updated view of the counter values, along with their description.

The top area shows process uptime information.

The center area shows a list of counter values.

The bottom area shows the description of the currently selected counter.


The following columns are displayed, from left to right:


The name of the counter


The current value of the counter.


The average per second change over the last update interval.


The average value of this counter over the runtime of the Varnish daemon, or a period if the counter can’t be averaged.


The moving average over the last 10 update intervals.


The moving average over the last 100 update intervals.


The moving average over the last 1000 update intervals.

Key bindings

The following keys control the interactive display:


Navigate the counter list one line up.


Navigate the counter list one line down.

<PAGEUP> or <b>

Navigate the counter list one page up.


Navigate the counter list one page down.


Toggle between showing and hiding unseen counters. Unseen counters are those that has been zero for the entire runtime of varnishstat. Defaults to hide unseen counters.


Toggle scaling of values.


Go to the top of the counter list.


Go to the bottom of the counter list.


Cycle through the verbosity levels. Defaults to only showing informational counters.




Sample now.


The XML output format is:

<varnishstat timestamp="YYYY-MM-DDTHH:mm:SS">
    <name>FIELD NAME</name>
    <value>FIELD VALUE</value>
    <flag>FIELD SEMANTICS</flag>
    <format>FIELD DISPLAY FORMAT</format>
    <description>FIELD DESCRIPTION</description>

The JSON output format is:

  "timestamp": "YYYY-MM-DDTHH:mm:SS",
    "description": "FIELD DESCRIPTION",
    "flag": "FIELD SEMANTICS", "format": "FIELD DISPLAY FORMAT",
    "value": FIELD VALUE
    "description": "FIELD DESCRIPTION",
    "flag": "FIELD SEMANTICS", "format": "FIELD DISPLAY FORMAT",
    "value": FIELD VALUE

Timestamp is the time when the report was generated by varnishstat.


This manual page was written by Dag-Erling Smørgrav, Per Buer, Lasse Karstensen and Martin Blix Grydeland.