Manual section: | 1 |
---|
varnishstat [-1] [-x] [-j] [-f field] [-l] [-n varnish_name] [-N filename] [-t seconds|<off>] [-V]
The varnishstat utility displays statistics from a running varnishd(1) instance.
The following options are available:
-1 | Instead of presenting a continuously updated display, print the statistics to stdout. |
-f | 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. |
-l | Lists the available fields to use with the -f option. |
-n | Specifies the name of the varnishd instance to get logs from. If -n is not specified, the host name is used. |
-N | Specify a the filename of a stale VSM instance. When using this option the abandonment checking is disabled. |
-V | Display the version number and exit. |
-x | Displays the result as XML. |
-j | Displays the result as JSON. |
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 following keys control the interactive display:
When using the -x option, the output is:
<varnishstat timestamp="YYYY-MM-DDTHH:mm:SS">
<stat>
<type>FIELD TYPE</type>
<ident>FIELD IDENT</ident>
<name>FIELD NAME</name>
<value>FIELD VALUE</value>
<flag>FIELD SEMANTICS</flag>
<format>FIELD DISPLAY FORMAT</format>
<description>FIELD DESCRIPTION</description>
</stat>
[..]
</varnishstat>
With -j the output format is:
{
"timestamp": "YYYY-MM-DDTHH:mm:SS",
"FIELD NAME": {
"description": "FIELD DESCRIPTION",
"type": "FIELD TYPE", "ident": "FIELD IDENT", "flag": "FIELD SEMANTICS", "format": "FIELD DISPLAY FORMAT",
"value": FIELD VALUE
},
"FIELD2 NAME": {
"description": "FIELD2 DESCRIPTION",
"type": "FIELD2 TYPE", "ident": "FIELD2 IDENT", "flag": "FIELD2 SEMANTICS", "format": "FIELD2 DISPLAY FORMAT",
"value": FIELD2 VALUE
},
[..]
}
Type and ident are optional. Timestamp is the time when the report was generated by varnishstat.
Repeated output with -1, -x or -j will have a single empty line (\n) between each block of output.
This manual page was written by Dag-Erling Smørgrav, Per Buer, Lasse Karstensen and Martin Blix Grydeland.