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 -w option, 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 -w means 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 -c option, and it includes other client transactions too. ✨
  • -g <session|request|vxid|raw> β€” how the log records get grouped. the default is grouping by vxid. 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 -i options. 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 -I options 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 the varnishd(1) -n option 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 -Q or -q options are specified, all queries are considered as if the or operator was used to combine them. 🌸
  • -q <query> β€” specifies the VSL query to use. when multiple -q or -Q options are specified, all queries are considered as if the or operator was used to combine them. 🌸
  • -r <filename> β€” read the log in binary file format from this file. the file can be created with varnishlog -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 of s is 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 raw grouping mode, this setting can not be used alongside -i, -I, -x or -X, and we advise using -q instead. πŸ™ˆ
  • -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 a Begin tag and the End tag. 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 -w option, 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 -a option was specified. if the application receives a SIGHUP in daemon mode, the file will be reopened, allowing the old one to be rotated away. the file can then be read by varnishlog and other tools with the -r option, unless the -A option was specified. this option is required when running in daemon mode. if the filename is -, varnishlog writes 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 -x options 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 -X options may be given. 🚫
  • --optstring β€” print the optstring parameter to getopt(3) to help writing wrapper scripts. for the script girlies 🫢

πŸ’œ SIGNALS πŸ’œ

  • SIGHUP β€” rotate the log file (see the -w option) 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. πŸ‘‘


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