1VARNISHSTAT(1) VARNISHSTAT(1)
2
3
4
6 varnishstat - Varnish Cache statistics
7
9 varnishstat [-1] [-f <glob>] [-h] [-j] [-l] [-n <dir>] [-t <sec‐
10 onds|off>] [-V] [-x]
11
13 The varnishstat utility displays statistics from a running varnishd(1)
14 instance.
15
16 The following options are available:
17
18 -1 Instead of presenting a continuously updated display, print the
19 statistics to stdout.
20
21 -f <glob>
22 Field inclusion glob. Use backslash to escape characters. If the
23 argument starts with '^' it is used as an exclusive glob. Multi‐
24 ple -f arguments may be given. Inclusive globs are accumulative
25 and are run before exclusive ones.
26
27 -h Print program usage and exit
28
29 -j Print statistics to stdout as JSON.
30
31 -l Lists the available fields to use with the -f option.
32
33 -n <dir>
34 Specify the varnishd working directory (also known as instance
35 name) to get logs from. If -n is not specified, the host name is
36 used.
37
38 -t <seconds|off>
39 Timeout before returning error on initial VSM connection. If set
40 the VSM connection is retried every 0.5 seconds for this many
41 seconds. If zero the connection is attempted only once and will
42 fail immediately if unsuccessful. If set to "off", the connec‐
43 tion will not fail, allowing the utility to start and wait inde‐
44 finetely for the Varnish instance to appear. Defaults to 5 sec‐
45 onds.
46
47 -V Print version information and exit.
48
49 -x Print statistics to stdout as XML.
50
51 --optstring
52 Print the optstring parameter to getopt(3) to help writing wrap‐
53 per scripts.
54
56 When neither -1, -j nor -x options are given, the application starts up
57 in curses mode. This shows a continuously updated view of the counter
58 values, along with their description.
59
60 The top area shows process uptime information.
61
62 The center area shows a list of counter values.
63
64 The bottom area shows the description of the currently selected
65 counter.
66
67 On startup, only counters at INFO level are shown.
68
69 Columns
70 The following columns are displayed, from left to right:
71
72 Name The name of the counter
73
74 Current
75 The current value of the counter.
76
77 Change The average per second change over the last update interval.
78
79 Average
80 The average value of this counter over the runtime of the Var‐
81 nish daemon, or a period if the counter can't be averaged.
82
83 Avg_10 The moving average over the last 10 update intervals.
84
85 Avg_100
86 The moving average over the last 100 update intervals.
87
88 Avg_1000
89 The moving average over the last 1000 update intervals.
90
91 Key bindings
92 <UP> or <k>
93 Navigate the counter list one line up.
94
95 <DOWN> or <j>
96 Navigate the counter list one line down.
97
98 <PAGEUP> or <b> or <CTRL-B>
99 Navigate the counter list one page up.
100
101 <PAGEDOWN> or <SPACE> or <CTRL-F>
102 Navigate the counter list one page down.
103
104 <HOME> or <g>
105 Navigate the counter list to the top.
106
107 <END> or <G>
108 Navigate the counter list to the bottom.
109
110 <d> Toggle between showing and hiding unseen counters. Unseen coun‐
111 ters are those that has been zero for the entire runtime of var‐
112 nishstat. Defaults to hide unseen counters.
113
114 <e> Toggle scaling of values.
115
116 <v> Increase verbosity. Defaults to only showing informational coun‐
117 ters.
118
119 <V> Decrease verbosity. Defaults to only showing informational coun‐
120 ters.
121
122 <q> Quit.
123
124 <CTRL+T>
125 Sample now.
126
127 <+> Increase refresh interval.
128
129 <-> Decrease refresh interval.
130
132 The XML output format is:
133
134 <varnishstat timestamp="YYYY-MM-DDTHH:mm:SS">
135 <stat>
136 <name>FIELD NAME</name>
137 <value>FIELD VALUE</value>
138 <flag>FIELD SEMANTICS</flag>
139 <format>FIELD DISPLAY FORMAT</format>
140 <description>FIELD DESCRIPTION</description>
141 </stat>
142 [..]
143 </varnishstat>
144
145 The JSON output format is:
146
147 {
148 "timestamp": "YYYY-MM-DDTHH:mm:SS",
149 "FIELD NAME": {
150 "description": "FIELD DESCRIPTION",
151 "flag": "FIELD SEMANTICS", "format": "FIELD DISPLAY FORMAT",
152 "value": FIELD VALUE
153 },
154 "FIELD NAME": {
155 "description": "FIELD DESCRIPTION",
156 "flag": "FIELD SEMANTICS", "format": "FIELD DISPLAY FORMAT",
157 "value": FIELD VALUE
158 },
159 [..]
160 }
161
162 Timestamp is the time when the report was generated by varnishstat.
163
165 · varnishd(1)
166
167 · varnishhist(1)
168
169 · varnishlog(1)
170
171 · varnishncsa(1)
172
173 · varnishtop(1)
174
175 · curses(3)
176
177 · varnish-counters(7)
178
180 This manual page was written by Dag-Erling Smørgrav, Per Buer, Lasse
181 Karstensen and Martin Blix Grydeland.
182
183
184
185
186 VARNISHSTAT(1)