File: //proc/thread-self/root/usr/share/doc/varnish-6.0.3/html/reference/varnishlog.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>varnishlog — Varnish version 6.0.3 documentation</title>
<link rel="stylesheet" href="../_static/classic.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script type="text/javascript" src="../_static/jquery.js"></script>
<script type="text/javascript" src="../_static/underscore.js"></script>
<script type="text/javascript" src="../_static/doctools.js"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="varnishncsa" href="varnishncsa.html" />
<link rel="prev" title="varnishhist" href="varnishhist.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="varnishncsa.html" title="varnishncsa"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="varnishhist.html" title="varnishhist"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">Varnish version 6.0.3 documentation</a> »</li>
<li class="nav-item nav-item-1"><a href="index.html" accesskey="U">The Varnish Reference Manual</a> »</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="varnishlog">
<span id="varnishlog-1"></span><h1>varnishlog<a class="headerlink" href="#varnishlog" title="Permalink to this headline">¶</a></h1>
<div class="section" id="display-varnish-logs">
<h2>Display Varnish logs<a class="headerlink" href="#display-varnish-logs" title="Permalink to this headline">¶</a></h2>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Manual section:</th><td class="field-body">1</td>
</tr>
</tbody>
</table>
<div class="section" id="synopsis">
<h3>SYNOPSIS<a class="headerlink" href="#synopsis" title="Permalink to this headline">¶</a></h3>
<p>varnishlog [-a] [-A] [-b] [-c] [-C] [-d] [-D] [-g <session|request|vxid|raw>] [-h] [-i <taglist>] [-I <[taglist:]regex>] [-k <num>] [-L <limit>] [-n <dir>] [-P <file>] [-q <query>] [-r <filename>] [-R <limit[/duration]>] [-t <seconds|off>] [-T <seconds>] [-v] [-V] [-w <filename>] [-x <taglist>] [-X <[taglist:]regex>]</p>
</div>
<div class="section" id="options">
<h3>OPTIONS<a class="headerlink" href="#options" title="Permalink to this headline">¶</a></h3>
<p>The following options are available:</p>
<table class="docutils option-list" frame="void" rules="none">
<col class="option" />
<col class="description" />
<tbody valign="top">
<tr><td class="option-group">
<kbd><span class="option">-a</span></kbd></td>
<td>When writing output to a file with the -w option, append to it rather than overwrite it.</td></tr>
<tr><td class="option-group">
<kbd><span class="option">-A</span></kbd></td>
<td>When writing output to a file with the -w option, output data in ascii format.</td></tr>
<tr><td class="option-group">
<kbd><span class="option">-b</span></kbd></td>
<td>Only display transactions and log records coming from backend communication.</td></tr>
<tr><td class="option-group">
<kbd><span class="option">-c</span></kbd></td>
<td>Only display transactions and log records coming from client communication.</td></tr>
<tr><td class="option-group">
<kbd><span class="option">-C</span></kbd></td>
<td>Do all regular expression and string matching caseless.</td></tr>
<tr><td class="option-group">
<kbd><span class="option">-d</span></kbd></td>
<td>Process log records at the head of the log and exit.</td></tr>
<tr><td class="option-group">
<kbd><span class="option">-D</span></kbd></td>
<td>Daemonize.</td></tr>
<tr><td class="option-group" colspan="2">
<kbd><span class="option">-g <var><session|request|vxid|raw></var></span></kbd></td>
</tr>
<tr><td> </td><td>The grouping of the log records. The default is to group by vxid.</td></tr>
<tr><td class="option-group">
<kbd><span class="option">-h</span></kbd></td>
<td>Print program usage and exit</td></tr>
<tr><td class="option-group">
<kbd><span class="option">-i <var><taglist></var></span></kbd></td>
<td><p class="first">Include log records of these tags in output. Taglist is a comma-separated list of tag globs. Multiple -i options may be given.</p>
<p class="last">If a tag include option is the first of any tag selection options, all tags are first marked excluded.</p>
</td></tr>
<tr><td class="option-group" colspan="2">
<kbd><span class="option">-I <var><[taglist:]regex></var></span></kbd></td>
</tr>
<tr><td> </td><td><p class="first">Include by regex matching. Output only records matching taglist and regular expression. Applies to any tag if taglist is absent. Multiple -I options may be given.</p>
<p class="last">If a tag include option is the first of any tag selection options, all tags are first marked excluded.</p>
</td></tr>
<tr><td class="option-group">
<kbd><span class="option">-k <var><num></var></span></kbd></td>
<td>Process this number of matching log transactions before exiting.</td></tr>
<tr><td class="option-group">
<kbd><span class="option">-L <var><limit></var></span></kbd></td>
<td>Sets the upper limit of incomplete transactions kept before the oldest transaction is force completed. A warning record is synthesized when this happens. This setting keeps an upper bound on the memory usage of running queries. Defaults to 1000 transactions.</td></tr>
<tr><td class="option-group">
<kbd><span class="option">-n <var><dir></var></span></kbd></td>
<td>Specify the varnishd working directory (also known as instance name) to get logs from. If -n is not specified, the host name is used.</td></tr>
<tr><td class="option-group">
<kbd><span class="option">-P <var><file></var></span></kbd></td>
<td>Write the process’ PID to the specified file.</td></tr>
<tr><td class="option-group">
<kbd><span class="option">-q <var><query></var></span></kbd></td>
<td>Specifies the VSL query to use.</td></tr>
<tr><td class="option-group">
<kbd><span class="option">-r <var><filename></var></span></kbd></td>
<td>Read log in binary file format from this file. The file can be created with <code class="docutils literal notranslate"><span class="pre">varnishlog</span> <span class="pre">-w</span> <span class="pre">filename</span></code>.</td></tr>
<tr><td class="option-group" colspan="2">
<kbd><span class="option">-R <var><limit[/duration]></var></span></kbd></td>
</tr>
<tr><td> </td><td>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 <code class="docutils literal notranslate"><span class="pre">s</span></code> is used. The duration field can be formatted as in VCL (e.g. <code class="docutils literal notranslate"><span class="pre">-R</span> <span class="pre">10/2m</span></code>) or as a simple time period without the prefix (e.g. <code class="docutils literal notranslate"><span class="pre">-R</span> <span class="pre">5/m</span></code>). When in <code class="docutils literal notranslate"><span class="pre">-g</span> <span class="pre">raw</span></code> grouping mode, this setting can not be used alongside <code class="docutils literal notranslate"><span class="pre">-i</span></code>, <code class="docutils literal notranslate"><span class="pre">-I</span></code>, <code class="docutils literal notranslate"><span class="pre">-x</span></code> or <code class="docutils literal notranslate"><span class="pre">-X</span></code>, and we advise using <code class="docutils literal notranslate"><span class="pre">-q</span></code> instead.</td></tr>
<tr><td class="option-group" colspan="2">
<kbd><span class="option">-t <var><seconds|off></var></span></kbd></td>
</tr>
<tr><td> </td><td>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 indefinetely for the Varnish instance to appear. Defaults to 5 seconds.</td></tr>
<tr><td class="option-group">
<kbd><span class="option">-T <var><seconds></var></span></kbd></td>
<td>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.</td></tr>
<tr><td class="option-group">
<kbd><span class="option">-v</span></kbd></td>
<td>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.</td></tr>
<tr><td class="option-group">
<kbd><span class="option">-V</span></kbd></td>
<td>Print version information and exit.</td></tr>
<tr><td class="option-group">
<kbd><span class="option">-w <var><filename></var></span></kbd></td>
<td>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.</td></tr>
<tr><td class="option-group">
<kbd><span class="option">-x <var><taglist></var></span></kbd></td>
<td>Exclude log records of these tags in output. Taglist is a comma-separated list of tag globs. Multiple -x options may be given.</td></tr>
<tr><td class="option-group" colspan="2">
<kbd><span class="option">-X <var><[taglist:]regex></var></span></kbd></td>
</tr>
<tr><td> </td><td>Exclude by regex matching. Do not output records matching taglist and regular expression. Applies to any tag if taglist is absent. Multiple -X options may be given.</td></tr>
<tr><td class="option-group">
<kbd><span class="option">--optstring</span></kbd></td>
<td>Print the optstring parameter to <code class="docutils literal notranslate"><span class="pre">getopt(3)</span></code> to help writing wrapper scripts.</td></tr>
</tbody>
</table>
</div>
<div class="section" id="signals">
<h3>SIGNALS<a class="headerlink" href="#signals" title="Permalink to this headline">¶</a></h3>
<ul>
<li><p class="first">SIGHUP</p>
<p>Rotate the log file (see -w option)</p>
</li>
<li><p class="first">SIGUSR1</p>
<p>Flush any outstanding transactions</p>
</li>
</ul>
</div>
<div class="section" id="see-also">
<h3>SEE ALSO<a class="headerlink" href="#see-also" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><a class="reference internal" href="varnishd.html#varnishd-1"><span class="std std-ref">varnishd</span></a></li>
<li><a class="reference internal" href="varnishhist.html#varnishhist-1"><span class="std std-ref">varnishhist</span></a></li>
<li><a class="reference internal" href="varnishncsa.html#varnishncsa-1"><span class="std std-ref">varnishncsa</span></a></li>
<li><a class="reference internal" href="varnishstat.html#varnishstat-1"><span class="std std-ref">varnishstat</span></a></li>
<li><a class="reference internal" href="varnishtop.html#varnishtop-1"><span class="std std-ref">varnishtop</span></a></li>
<li><a class="reference internal" href="vsl.html#vsl-7"><span class="std std-ref">VSL</span></a></li>
<li><a class="reference internal" href="vsl-query.html#vsl-query-7"><span class="std std-ref">vsl-query</span></a></li>
</ul>
</div>
<div class="section" id="history">
<h3>HISTORY<a class="headerlink" href="#history" title="Permalink to this headline">¶</a></h3>
<p>The varnishlog utility was developed by Poul-Henning Kamp
<<a class="reference external" href="mailto:phk%40phk.freebsd.dk">phk<span>@</span>phk<span>.</span>freebsd<span>.</span>dk</a>> 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.</p>
</div>
<div class="section" id="copyright">
<h3>COPYRIGHT<a class="headerlink" href="#copyright" title="Permalink to this headline">¶</a></h3>
<p>This document is licensed under the same licence as Varnish
itself. See LICENCE for details.</p>
<ul class="simple">
<li>Copyright (c) 2006 Verdens Gang AS</li>
<li>Copyright (c) 2006-2015 Varnish Software AS</li>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<h3><a href="../index.html">Table Of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">varnishlog</a><ul>
<li><a class="reference internal" href="#display-varnish-logs">Display Varnish logs</a><ul>
<li><a class="reference internal" href="#synopsis">SYNOPSIS</a></li>
<li><a class="reference internal" href="#options">OPTIONS</a></li>
<li><a class="reference internal" href="#signals">SIGNALS</a></li>
<li><a class="reference internal" href="#see-also">SEE ALSO</a></li>
<li><a class="reference internal" href="#history">HISTORY</a></li>
<li><a class="reference internal" href="#copyright">COPYRIGHT</a></li>
</ul>
</li>
</ul>
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="varnishhist.html"
title="previous chapter">varnishhist</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="varnishncsa.html"
title="next chapter">varnishncsa</a></p>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/reference/varnishlog.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3>Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../search.html" method="get">
<input type="text" name="q" />
<input type="submit" value="Go" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="varnishncsa.html" title="varnishncsa"
>next</a> |</li>
<li class="right" >
<a href="varnishhist.html" title="varnishhist"
>previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">Varnish version 6.0.3 documentation</a> »</li>
<li class="nav-item nav-item-1"><a href="index.html" >The Varnish Reference Manual</a> »</li>
</ul>
</div>
<div class="footer" role="contentinfo">
© Copyright 2010-2014, Varnish Software AS.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.7.6.
</div>
</body>
</html>