1VARNISHSTAT(1)                                                  VARNISHSTAT(1)
2
3
4

NAME

6       varnishstat - Varnish Cache statistics
7

SYNOPSIS

9       varnishstat [-1] [-f <glob>] [-h] [-I <glob>] [-j] [-l] [-n <dir>] [-r]
10       [-t <seconds|off>] [-V] [-X <glob>] [-x]
11

DESCRIPTION

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       -r     Toggle raw or adjusted gauges, adjusted is the default.
46
47       -t <seconds|off>
48              Timeout before returning error on initial VSM connection. If set
49              the VSM connection is retried every 0.5 seconds  for  this  many
50              seconds.  If zero the connection is attempted only once and will
51              fail immediately if unsuccessful. If set to "off",  the  connec‐
52              tion will not fail, allowing the utility to start and wait inde‐
53              finetely for the Varnish instance to appear.  Defaults to 5 sec‐
54              onds.
55
56       -V     Print version information and exit.
57
58       -X <glob>
59              Field exclusion glob. Use backslash to escape characters. Multi‐
60              ple -X  arguments may be given. Exclusion globs are run in order
61              along  with  inclusion globs (-I arguments) and legacy filtering
62              globs (-f arguments) on a first-match basis.
63
64       -x     Print statistics to stdout as XML.
65
66       --optstring
67              Print the optstring parameter to getopt(3) to help writing wrap‐
68              per scripts.
69

CURSES MODE

71       When neither -1, -j nor -x options are given, the application starts up
72       in curses mode. This shows a continuously updated view of  the  counter
73       values, along with their description.
74
75       The top area shows process uptime information.
76
77       The center area shows a list of counter values.
78
79       The  bottom  area  shows  the  description  of  the  currently selected
80       counter.
81
82       On startup, only counters at INFO level are shown.
83
84   Columns
85       The following columns are displayed, from left to right:
86
87       Name   The name of the counter
88
89       Current
90              The current value of the counter.
91
92       Change The average per second change over the last update interval.
93
94       Average
95              The average value of this counter over the runtime of  the  Var‐
96              nish daemon, or a period if the counter can't be averaged.
97
98       Avg_10 The moving average over the last 10 update intervals.
99
100       Avg_100
101              The moving average over the last 100 update intervals.
102
103       Avg_1000
104              The moving average over the last 1000 update intervals.
105
106   Key bindings
107       <h>    Toggle the help screen.
108
109       <UP> or <k>
110              Navigate the counter list one line up.
111
112       <DOWN> or <j>
113              Navigate the counter list one line down.
114
115       <PAGEUP> or <b> or <CTRL-B>
116              Navigate the counter list one page up.
117
118       <PAGEDOWN> or <SPACE> or <CTRL-F>
119              Navigate the counter list one page down.
120
121       <HOME> or <g>
122              Navigate the counter list to the top.
123
124       <END> or <G>
125              Navigate the counter list to the bottom.
126
127       <d>    Toggle  between showing and hiding unseen counters. Unseen coun‐
128              ters are those that has been zero for the entire runtime of var‐
129              nishstat. Defaults to hide unseen counters.
130
131       <r>    Toggle  between showing raw and adjusted gauges. When a gauge is
132              decremented faster than it is incremented, it may  appear  as  a
133              large integer with its most significant bit set. By default such
134              values are adjusted to zero.
135
136       <e>    Toggle scaling of values.
137
138       <v>    Increase verbosity. Defaults to only showing informational coun‐
139              ters.
140
141       <V>    Decrease verbosity. Defaults to only showing informational coun‐
142              ters.
143
144       <q>    Quit.
145
146       <CTRL+T>
147              Sample now.
148
149       <+>    Increase refresh interval.
150
151       <->    Decrease refresh interval.
152

OUTPUTS

154       The XML output format is:
155
156          <varnishstat timestamp="YYYY-MM-DDTHH:mm:SS">
157            <stat>
158              <name>FIELD NAME</name>
159              <value>FIELD VALUE</value>
160              <flag>FIELD SEMANTICS</flag>
161              <format>FIELD DISPLAY FORMAT</format>
162              <description>FIELD DESCRIPTION</description>
163            </stat>
164            [..]
165          </varnishstat>
166
167       The JSON output format is:
168
169          {
170            "timestamp": "YYYY-MM-DDTHH:mm:SS",
171            "FIELD NAME": {
172              "description": "FIELD DESCRIPTION",
173              "flag": "FIELD SEMANTICS", "format": "FIELD DISPLAY FORMAT",
174              "value": FIELD VALUE
175            },
176            "FIELD NAME": {
177              "description": "FIELD DESCRIPTION",
178              "flag": "FIELD SEMANTICS", "format": "FIELD DISPLAY FORMAT",
179              "value": FIELD VALUE
180            },
181            [..]
182          }
183
184       Timestamp is the time when the report was generated by varnishstat.
185

SEE ALSO

187varnishd(1)
188
189varnishhist(1)
190
191varnishlog(1)
192
193varnishncsa(1)
194
195varnishtop(1)
196
197       • curses(3)
198
199varnish-counters(7)
200

AUTHORS

202       This manual page was written by Dag-Erling Smørgrav,  Per  Buer,  Lasse
203       Karstensen and Martin Blix Grydeland.
204
205
206
207
208                                                                VARNISHSTAT(1)
Impressum