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