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 or -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 Columns
68 The following columns are displayed, from left to right:
69
70 Name The name of the counter
71
72 Current
73 The current value of the counter.
74
75 Change The average per second change over the last update interval.
76
77 Average
78 The average value of this counter over the runtime of the Var‐
79 nish daemon, or a period if the counter can't be averaged.
80
81 Avg_10 The moving average over the last 10 update intervals.
82
83 Avg_100
84 The moving average over the last 100 update intervals.
85
86 Avg_1000
87 The moving average over the last 1000 update intervals.
88
89 Key bindings
90 The following keys control the interactive display:
91
92 <UP> Navigate the counter list one line up.
93
94 <DOWN> Navigate the counter list one line down.
95
96 <PAGEUP> or <b>
97 Navigate the counter list one page up.
98
99 <PAGEDOWN> or <SPACE>
100 Navigate the counter list one page down.
101
102 <HOME> Navigate the counter list to the top.
103
104 <END> Navigate the counter list to the bottom.
105
106 <d> Toggle between showing and hiding unseen counters. Unseen coun‐
107 ters are those that has been zero for the entire runtime of var‐
108 nishstat. Defaults to hide unseen counters.
109
110 <e> Toggle scaling of values.
111
112 <g> Go to the top of the counter list.
113
114 <G> Go to the bottom of the counter list.
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)