VARNISHSTAT(1)

๐ŸŽ€ VARNISHSTAT โœจ

okay bestie, gather round, because this is the varnishstat(1) page from your friendly neighbourhood General Commands Manual (section 1, obviously) and it's about to be your new obsession. ๐Ÿ’–


โœจ NAME โœจ

varnishstat โ€” Varnish Cache statistics ๐Ÿ‘‘


๐Ÿฆ‹ SYNOPSIS ๐Ÿฆ‹

varnishstat [-1] [-c] [-f <glob>] [-h] [-I <glob>] [-j] [-l] [-n
<workdir>] [-r] [-t <seconds|off>] [-V] [-X <glob>] [-x]

๐ŸŒธ DESCRIPTION ๐ŸŒธ

the varnishstat utility shows you the statistics from a varnishd(1) instance that's currently running. like, it's literally peeking at the numbers your cache is doing in real time. no cap. ๐Ÿ“Š

the following options are available:

  • -1 โ€” instead of doing the whole continuously-updated display thing, it just prints the stats to stdout. this is the default when standard output is being redirected. ๐Ÿ’…
  • -c โ€” gives you a continuously updated, interactive display. this is the default when the standard output isn't redirected. main character behaviour fr.
  • -f <glob> โ€” a legacy field filtering glob. use a backslash to escape characters. if the argument starts with '^' it gets used as an exclusive glob. you can pass multiple -f arguments. legacy filtering globs run along with inclusion globs (-I arguments) and exclusion globs (-X arguments) in order on a first-match basis. ๐Ÿซถ
  • -h โ€” print the program usage and dip. bye! ๐Ÿ‘‹
  • -I <glob> โ€” field inclusion glob. use a backslash to escape characters. multiple -I arguments are allowed. exclusion globs are run in order along with exclusion globs (-X arguments) and legacy filtering globs (-f arguments) on a first-match basis. ๐ŸŒˆ
  • -j โ€” print the statistics to stdout as JSON. for the json girlies. ๐Ÿ’œ
  • -l โ€” lists all the available fields you can use with the -f option. window shopping, but for counters. ๐Ÿ›๏ธ
  • -n <workdir> โ€” specify the varnish working directory of the instance you wanna attach to. peep the varnishd(1) -n option docs for the extra info and the defaults. ๐Ÿ“
  • -r โ€” toggle between raw and adjusted gauges. adjusted is the default. โš–๏ธ
  • -t <seconds|off> โ€” timeout before it returns an error on the initial VSM connection. if you set it, the VSM connection gets retried every 0.5 seconds for that many seconds. if it's zero, the connection is only attempted once and will fail immediately if it doesn't work out. if it's set to "off", the connection will not fail โ€” so the utility can start up and wait indefinitely for the Varnish instance to show up. defaults to 5 seconds. โฐ
  • -V โ€” print version information and exit. ๐Ÿท๏ธ
  • -X <glob> โ€” field exclusion glob. use a backslash to escape characters. multiple -X arguments are allowed. exclusion globs are run in order along with inclusion globs (-I arguments) and legacy filtering globs (-f arguments) on a first-match basis. ๐Ÿšซ
  • -x โ€” print the statistics to stdout as XML. retro vibes, honestly. โœจ
  • --optstring โ€” prints the optstring parameter to getopt(3) to help you write wrapper scripts. lowkey a lifesaver for scripting besties. ๐Ÿงš

๐Ÿ”ฎ CURSES MODE ๐Ÿ”ฎ

when you don't pass -1, -j or -x, the application boots up in curses mode. this gives you a continuously updated view of the counter values, plus their descriptions. it's giving dashboard. ๐Ÿ‘‘

  • the top area shows process uptime information. โฑ๏ธ
  • the center area shows a list of counter values. ๐Ÿ“œ
  • the bottom area shows the description of whichever counter is currently selected. ๐Ÿ”

on startup, only counters at INFO level are shown. ๐Ÿ’…

๐Ÿ“Š Columns ๐Ÿ“Š

these are the columns displayed, from left to right:

  • Name โ€” the name of the counter. ๐Ÿท๏ธ
  • Current โ€” the current value of the counter. ๐Ÿ“
  • Change โ€” the average per second change over the last update interval. ๐Ÿ“ˆ
  • Average โ€” the average value of this counter over the runtime of the Varnish daemon, or over a period if the counter can't be averaged. ๐Ÿงฎ
  • Avg_10 โ€” the moving average over the last 10 update intervals. ๐Ÿ”Ÿ
  • Avg_100 โ€” the moving average over the last 100 update intervals. ๐Ÿ’ฏ
  • Avg_1000 โ€” the moving average over the last 1000 update intervals. ๐Ÿš€

๐ŸŽน Key bindings ๐ŸŽน

  • <h> โ€” toggle the help screen. ๐Ÿ†˜
  • <UP> or <k> โ€” navigate the counter list one line up. โฌ†๏ธ
  • <DOWN> or <j> โ€” navigate the counter list one line down. โฌ‡๏ธ
  • <PAGEUP> or <b> or <CTRL-B> โ€” navigate the counter list one page up. ๐Ÿ“„
  • <PAGEDOWN> or <SPACE> or <CTRL-F> โ€” navigate the counter list one page down. ๐Ÿ“ƒ
  • <HOME> or <g> โ€” navigate the counter list to the top. ๐Ÿ”
  • <END> or <G> โ€” navigate the counter list to the bottom. ๐Ÿ”š
  • <d> โ€” toggle between showing and hiding unseen counters. unseen counters are those that have been zero for the entire runtime of varnishstat. defaults to hiding unseen counters. ๐Ÿ™ˆ
  • <r> โ€” toggle between showing raw and adjusted gauges. when a gauge gets decremented faster than it's incremented, it may show up as a large integer with its most significant bit set. by default, such values are adjusted to zero. ๐Ÿ’…
  • <e> โ€” toggle scaling of values. ๐Ÿ“
  • <v> โ€” increase verbosity. defaults to only showing informational counters. ๐Ÿ—ฃ๏ธ
  • <V> โ€” decrease verbosity. defaults to only showing informational counters. ๐Ÿคซ
  • <q> โ€” quit. ๐Ÿƒ
  • <CTRL+T> โ€” sample now. ๐Ÿ“ธ
  • <0> โ€” reset averages. ๐Ÿ”„
  • <+> โ€” increase refresh interval. โž•
  • <-> โ€” decrease refresh interval. โž–

๐Ÿ’พ OUTPUTS ๐Ÿ’พ

the XML output format is:

<varnishstat timestamp="YYYY-MM-DDTHH:mm:SS">
  <stat>
    <name>FIELD NAME</name>
    <value>FIELD VALUE</value>
    <flag>FIELD SEMANTICS</flag>
    <format>FIELD DISPLAY FORMAT</format>
    <description>FIELD DESCRIPTION</description>
  </stat>
  [..]
</varnishstat>

the JSON output format is:

{
  "timestamp": "YYYY-MM-DDTHH:mm:SS",
  "FIELD NAME": {
    "description": "FIELD DESCRIPTION",
    "flag": "FIELD SEMANTICS", "format": "FIELD DISPLAY FORMAT",
    "value": FIELD VALUE
  },
  "FIELD NAME": {
    "description": "FIELD DESCRIPTION",
    "flag": "FIELD SEMANTICS", "format": "FIELD DISPLAY FORMAT",
    "value": FIELD VALUE
  },
  [..]
}

Timestamp is the time when the report was generated by varnishstat. ๐Ÿ•ฐ๏ธ


๐Ÿ‘€ SEE ALSO ๐Ÿ‘€


๐Ÿซถ AUTHORS ๐Ÿซถ

this manual page was written by Dag-Erling Smรธrgrav, Per Buer, Lasse Karstensen and Martin Blix Grydeland. absolute icons, the whole squad. ๐Ÿ‘‘


and that's the whole varnishstat(1) page bestie, straight from section 1 of the General Commands Manual โ€” go forth and read your counters, you ate ๐Ÿ’…โœจ๐ŸŒธ

๐Ÿ“ฆ where this page comes from
  • fedora 44: varnish 8.0.2-1.fc44 ยท BSD-2-Clause AND (BSD-2-Clause-FreeBSD AND BSD-3-Clause AND LicenseRef-Fedora-Public-Domain AND Zlib)
  • fedora 44: varnish 8.0.2-1.fc44 ยท BSD-2-Clause AND (BSD-2-Clause-FreeBSD AND BSD-3-Clause AND LicenseRef-Fedora-Public-Domain AND Zlib)
  • ๐Ÿ“œ the page's license: BSD-2-Clause
  • ๐Ÿ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms