VARNISHLOG(1)
πΈ NAME πΈ
varnishlog β display Varnish logs. That's the whole job description and honestly? She ate. π
β¨ SYNOPSIS β¨
varnishlog [-a] [-A] [-b] [-c] [-C] [-d] [-D] [-E] [-g <session|request|vxid|raw>] [-h] [-i <taglist>] [-I <[taglist:]regex>] [-k <num>] [-L <limit>] [-n <workdir>] [-P <file>] [-Q <file>] [-q <query>] [-r <filename>] [-R <limit[/duration]>] [-t <seconds|off>] [-T <seconds>] [-u] [-v] [-V] [-w <filename>] [-x <taglist>] [-X <[taglist:]regex>]
look at her. all those little flags. a whole wardrobe bestie π
π OPTIONS π
The following options are available, and yes, we're doing all of them. no skipping, no summarising, that's not the vibe here. π«Ά
-aβ when you're writing output to a file with the-woption, this appends to it instead of clobbering what's already there. lowkey important: this does nothing without-w. it's giving "only works with her bestie." π-Aβ when writing output to a file with-w, spit the data out in ascii format. same deal, no-wmeans no effect at all. π-bβ only show transactions and log records that came from backend communication. backstage content only. β¨-cβ only show transactions and log records from client communication. front-of-house girlies. π-Cβ do all the regular expression and string matching caseless. uppercase, lowercase, she does not care. π-dβ process the log records at the head of the log, then exit. read the top, dip. π¦-Dβ daemonize. she's going independent, moving out, paying her own rent. π-Eβ display ESI transactions and other types of sub-requests. heads up: this implies the-coption, and it includes other client transactions too. β¨-g <session|request|vxid|raw>β how the log records get grouped. the default is grouping byvxid. pick your era. π-hβ print program usage and exit. help me help you. π«Ά-i <taglist>β include log records with these tags in the output. the taglist is a comma-separated list of tag globs, and you can stack multiple-ioptions. also, real talk: if a tag include option is the first of any tag selection options, all tags get marked excluded first. π-I <[taglist:]regex>β include by regex matching. only output records that match the taglist and the regular expression. if the taglist isn't there, it applies to any tag. multiple-Ioptions are allowed. and same rule as above: if a tag include option is the first of any tag selection options, all tags are first marked excluded. π-k <num>β process this number of matching log transactions, then exit. she has a limit and she respects it. β-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 setting keeps an upper bound on the memory usage of running queries. defaults to 1000 transactions. π§-n <workdir>β specify the varnish working directory of the instance you want to attach to. for extra info and the defaults, go read thevarnishd(1)-noption documentation. iykyk. π-P <file>β write the process' PID to the specified file. π-Q <file>β specifies the file containing the VSL query to use. when multiple-Qor-qoptions are specified, all queries are considered 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 considered as if theoroperator was used to combine them. πΈ-r <filename>β read the log in binary file format from this file. the file can be created withvarnishlog -w filename. if the filename is-, logs are read from the standard input. and heads up: with-it cannot work as a daemon. π-R <limit[/duration]>β restrict the output to the specified limit. transactions exceeding the limit will be suppressed. the limit is specified as the maximum number of transactions (with respect to the chosen grouping method) and an optional time period. if no duration is specified, a default ofsis used. the duration field can be formatted as in VCL (e.g.-R 10/2m) or as a simple time period without the prefix (e.g.-R 5/m). > when in-g rawgrouping mode, this setting can not be used alongside-i,-I,-xor-X, and we advise using-qinstead. π-t <seconds|off>β timeout before returning error on initial VSM connection. if set, the VSM connection is retried every 0.5 seconds 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, allowing the utility to start and wait indefinitely for the Varnish instance to appear. defaults to 5 seconds. β³-T <seconds>β sets the transaction timeout in seconds. this defines the maximum number of seconds elapsed between aBegintag and theEndtag. if the timeout expires, a warning record is synthesized and the transaction is force completed. defaults to 120 seconds. β-uβ when writing output to a file with the-woption, output data is not buffered. no-w? no effect, bestie. π-vβ use verbose output on record set printing, giving the VXID on every log line. without this option, the VXID will only be given on the header of that transaction. she's chatty and we love that for her. π¬-Vβ print version information and exit. π-w <filename>β redirect output to file. the file will be overwritten unless the-aoption was specified. if the application receives aSIGHUPin daemon mode, the file will be reopened, allowing the old one to be rotated away. the file can then be read byvarnishlogand other tools with the-roption, unless the-Aoption was specified. this option is required when running in daemon mode. if the filename is-,varnishlogwrites to the standard output and cannot work as a daemon. π-x <taglist>β exclude log records of these tags from the output. the taglist is a comma-separated list of tag globs. multiple-xoptions may be given. bye bestie π-X <[taglist:]regex>β exclude by regex matching. do not output records matching the taglist and regular expression. if the taglist is absent, it applies to any tag. multiple-Xoptions may be given. π«--optstringβ print the optstring parameter togetopt(3)to help writing wrapper scripts. for the script girlies π«Ά
π SIGNALS π
SIGHUPβ rotate the log file (see the-woption) in daemon mode, and abort the loop and die gracefully when running in the foreground. dramatic exit, honestly iconic. πSIGUSR1β flush any outstanding transactions. she's clearing her drafts. π§Ή
π¦ SEE ALSO π¦
the whole friend group, fr fr. π«Ά
β HISTORY β
The varnishlog utility was developed by Poul-Henning Kamp <phk@phk.freebsd.dk> in cooperation with Verdens Gang AS and Varnish Software AS. This manual page was initially written by Dag-Erling SmΓΈrgrav, and later updated by Per Buer and Martin Blix Grydeland. legends only, no cap. π
π 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
okay bestie that's the whole page π this was VARNISHLOG(1) from the General Commands Manual, and if you ever need her again she's right there in your terminal waiting for you like the main character she is. 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-2019 Varnish Software AS
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms