VARNISHTOP(1)
π VARNISHTOP(1) π
okay bestie, gather round β this is the manual page for varnishtop, living its best life in the General Commands Manual section of your friendly neighbourhood Unix box. It's giving "top, but for Varnish logs." π
β¨ NAME β¨
varnishtop β Varnish log entry ranking π
πΈ SYNOPSIS πΈ
varnishtop [-1] [-b] [-c] [-C] [-d] [-E] [-f] [-g
<session|request|vxid|raw>] [-h] [-i <taglist>] [-I <[taglist:]regex>]
[-L <limit>] [-n <workdir>] [-p <period>] [-Q <file>] [-q <query>] [-r
<filename>] [-t <seconds|off>] [-T <seconds>] [-x <taglist>] [-X
<[taglist:]regex>] [-V]
π DESCRIPTION π
So like, varnishtop reads the shared memory logs of varnishd(1) and serves you a continuously updated list of the log entries that show up the most. It's basically a leaderboard for your logs. π₯
And if you filter it right with -I, -i, -X and -x, you can rank requested documents, clients, user agents, or literally anything else that got recorded in the log. main character energy for your log data. β¨
The following options are available:
π«Ά OPTIONS π«Ά
-1β instead of that always-refreshing live display, just print the stats once and dip. Lowkey implies-dtoo. π-bβ only show transactions and log records that came from backend communication.-cβ only show transactions and log records that came from client communication.-Cβ do all the regex and string matching caseless, no cap. (Case-insensitive, bestie.)-dβ process log records at the head of the log.-Eβ display ESI transactions and other types of sub-requests. This implies-cand includes other client transactions too. π-fβ sort and group only on the first field of each log entry. For entries shaped likeprefix: value, it's the prefix (sans colon) that gets sorted and grouped. Super useful when you're showing e.g.ReqStartentries, where that first field is the client IP address. π-g <session|request|vxid|raw>β how the log records get grouped. Default is grouping byvxid.-hβ print program usage and exit. Short and sweet. βοΈ-i <taglist>β include log records of these tags in the output. taglist is a comma-separated list of tag globs, and you can stack multiple-ioptions. π
heads up: if a tag include option is the first of any tag selection options, then all tags are first marked excluded.
-I <[taglist:]regex>β include by regex matching. Only outputs records matching taglist and the regular expression. Applies to any tag if taglist is absent. Multiple-Ioptions may be given. π
same deal: if a tag include option is the first of any tag selection options, all tags are first marked excluded.
-L <limit>β sets the upper limit of incomplete transactions kept before the oldest transaction gets force completed. When that happens, a warning record is synthesized. This keeps an upper bound on the memory usage of running queries. Defaults to1000transactions. π§-n <workdir>β specify the varnish working directory of the instance to attach to. Peep thevarnishd(1)-noption documentation for extra info and the defaults. π-p <period>β specifies the number of seconds to measure over; default is60seconds. The first number in the list is the average number of requests seen over this time period. This option does nothing if-1is also used. β±οΈ-Q <file>β specifies the file containing the VSL query to use. When multiple-Qor-qoptions are specified, all queries are treated as if theoroperator was used to combine them. π-q <query>β specifies the VSL query to use. When multiple-qor-Qoptions are specified, all queries are treated as if theoroperator was used to combine them. π¬-r <filename>β read log in binary file format from this file. You can make such a file withvarnishlog -w filename. If the filename is-, logs are read from the standard input, and it cannot work as a daemon. π¦-t <seconds|off>β timeout before returning an error on the initial VSM connection. If set, the VSM connection is retried every0.5seconds for this many seconds. If zero, the connection is attempted only once and will fail immediately if unsuccessful. If set to"off", the connection will not fail, letting the utility start and wait indefinitely for the Varnish instance to appear. Defaults to5seconds. β³-T <seconds>β sets the transaction timeout in seconds. This defines the max number of seconds elapsed between aBegintag and theEndtag. If the timeout expires, a warning record is synthesized and the transaction is force completed. Defaults to120seconds. β-x <taglist>β exclude log records of these tags in output. taglist is a comma-separated list of tag globs. Multiple-xoptions may be given. π«-X <[taglist:]regex>β exclude by regex matching. Do not output records matching taglist and the regular expression. Applies to any tag if taglist is absent. Multiple-Xoptions may be given. π-Vβ print version information and exit. π--optstringβ print the optstring parameter togetopt(3)to help when writing wrapper scripts. π§
π EXAMPLES π
This one gives you a continuously updated list of the most frequently requested URLs:
varnishtop -i ReqURL
And this one gives you a continuously updated list of the most commonly used user agents:
varnishtop -C -I ReqHeader:User-Agent
π SEE ALSO π
π HISTORY π
varnishtop was originally developed by Poul-Henning Kamp</> in cooperation with Verdens Gang AS and Varnish Software AS, and was later substantially rewritten by Dag-Erling SmΓΈrgrav</>. This manual page was written by Dag-Erling SmΓΈrgrav, and later updated by Martin Blix Grydeland. Iconic lineage honestly. π«Ά
βοΈ COPYRIGHT βοΈ
This document is licensed under the same licence as Varnish itself. See LICENCE for details.
- Copyright (c) 2006 Verdens Gang AS
- Copyright (c) 2006-2015 Varnish Software AS
and that's the whole page bestie!! π you've been reading VARNISHTOP(1) from the General Commands Manual β go rank some logs, you absolute legend, mwah π
β¨
π¦ where this page comes from
- alpine 3.22: varnish-doc 7.7.3-r0 Β· BSD-2-Clause
- alpine 3.23: varnish-doc 7.7.3-r0 Β· BSD-2-Clause
- alpine 3.24: varnish-doc 7.7.3-r0 Β· BSD-2-Clause
- debian trixie: varnish 7.7.0-3+deb13u1 Β· BSD-2-Clause
- debian trixie: varnish 7.7.0-3+deb13u2 Β· BSD-2-Clause
- 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)
- opensuse-leap 16.0: varnish 7.7.3-bp160.1.1 Β· BSD-2-Clause
- opensuse-leap 16.0: varnish 7.7.3-bp160.1.1 Β· BSD-2-Clause
- opensuse-leap 16.0: varnish 7.7.3-bp160.1.1 Β· BSD-2-Clause
- opensuse-leap 16.0: varnish 7.7.3-bp160.1.1 Β· BSD-2-Clause
- ubuntu questing: varnish 7.7.3-1
- π the page's license: BSD-2-Clause
- Copyright (c) 2010-2015 Varnish Software AS
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms