trAvis - MANAGER
Edit File: varnishtop.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="Content-Type" content="text/html; charset=utf-8" /> <title>varnishtop — Varnish version 5.2.1 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"> var DOCUMENTATION_OPTIONS = { URL_ROOT: '../', VERSION: '5.2.1', COLLAPSE_INDEX: false, FILE_SUFFIX: '.html', HAS_SOURCE: true }; </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="top" title="Varnish version 5.2.1 documentation" href="../index.html" /> <link rel="up" title="The Varnish Reference Manual" href="index.html" /> <link rel="next" title="VSM: Shared Memory Logging and Statistics" href="vsm.html" /> <link rel="prev" title="varnishtest" href="varnishtest.html" /> </head> <body role="document"> <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="vsm.html" title="VSM: Shared Memory Logging and Statistics" accesskey="N">next</a> |</li> <li class="right" > <a href="varnishtest.html" title="varnishtest" accesskey="P">previous</a> |</li> <li class="nav-item nav-item-0"><a href="../index.html">Varnish version 5.2.1 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="varnishtop"> <span id="varnishtop-1"></span><h1>varnishtop<a class="headerlink" href="#varnishtop" title="Permalink to this headline">¶</a></h1> <div class="section" id="varnish-log-entry-ranking"> <h2>Varnish log entry ranking<a class="headerlink" href="#varnish-log-entry-ranking" 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>varnishtop [-1] [-b] [-c] [-C] [-d] [-f] [-g <session|request|vxid|raw>] [-h] [-i <taglist>] [-I <[taglist:]regex>] [-L <limit>] [-n <dir>] [-p <period>] [-q <query>] [-r <filename>] [-t <seconds|off>] [-T <seconds>] [-x <taglist>] [-X <[taglist:]regex>] [-V]</p> </div> <div class="section" id="description"> <h3>DESCRIPTION<a class="headerlink" href="#description" title="Permalink to this headline">¶</a></h3> <p>The varnishtop utility reads <a class="reference internal" href="varnishd.html#varnishd-1"><span class="std std-ref">varnishd</span></a> shared memory logs and presents a continuously updated list of the most commonly occurring log entries. With suitable filtering using the <code class="docutils literal"><span class="pre">-I</span></code>, <code class="docutils literal"><span class="pre">-i</span></code>, <code class="docutils literal"><span class="pre">-X</span></code> and <code class="docutils literal"><span class="pre">-x</span></code> options, it can be used to display a ranking of requested documents, clients, user agents, or any other information which is recorded in the log.</p> <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">-1</span></kbd></td> <td>Instead of a continuously updated display, print the statistics once and exit. Implies <code class="docutils literal"><span class="pre">-d</span></code>.</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">-f</span></kbd></td> <td>Sort and group only on the first field of each log entry. This is useful when displaying e.g. stataddr entries, where the first field is the client IP address.</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.</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">-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><period></var></span></kbd></td> <td>Specified the number of seconds to measure over, the default is 60 seconds. The first number in the list is the average number of requests seen over this time period. This option has no effect if -1 option is also used.</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"><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">-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">-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.</td></tr> <tr><td class="option-group"> <kbd><span class="option">-V</span></kbd></td> <td>Print version information and exit.</td></tr> </tbody> </table> </div> <div class="section" id="examples"> <h3>EXAMPLES<a class="headerlink" href="#examples" title="Permalink to this headline">¶</a></h3> <p>The following example displays a continuously updated list of the most frequently requested URLs:</p> <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">varnishtop</span> <span class="o">-</span><span class="n">i</span> <span class="n">ReqURL</span> </pre></div> </div> <p>The following example displays a continuously updated list of the most commonly used user agents:</p> <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">varnishtop</span> <span class="o">-</span><span class="n">C</span> <span class="o">-</span><span class="n">I</span> <span class="n">ReqHeader</span><span class="p">:</span><span class="n">User</span><span class="o">-</span><span class="n">Agent</span> </pre></div> </div> </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="varnishlog.html#varnishlog-1"><span class="std std-ref">varnishlog</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> </ul> </div> <div class="section" id="history"> <h3>HISTORY<a class="headerlink" href="#history" title="Permalink to this headline">¶</a></h3> <p>The varnishtop utility was originally developed by Poul-Henning Kamp in cooperation with Verdens Gang AS and Varnish Software AS, and 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.</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="#">varnishtop</a><ul> <li><a class="reference internal" href="#varnish-log-entry-ranking">Varnish log entry ranking</a><ul> <li><a class="reference internal" href="#synopsis">SYNOPSIS</a></li> <li><a class="reference internal" href="#description">DESCRIPTION</a></li> <li><a class="reference internal" href="#examples">EXAMPLES</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="varnishtest.html" title="previous chapter">varnishtest</a></p> <h4>Next topic</h4> <p class="topless"><a href="vsm.html" title="next chapter">VSM: Shared Memory Logging and Statistics</a></p> <div role="note" aria-label="source link"> <h3>This Page</h3> <ul class="this-page-menu"> <li><a href="../_sources/reference/varnishtop.txt" rel="nofollow">Show Source</a></li> </ul> </div> <div id="searchbox" style="display: none" role="search"> <h3>Quick search</h3> <form class="search" action="../search.html" method="get"> <div><input type="text" name="q" /></div> <div><input type="submit" value="Go" /></div> <input type="hidden" name="check_keywords" value="yes" /> <input type="hidden" name="area" value="default" /> </form> </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="vsm.html" title="VSM: Shared Memory Logging and Statistics" >next</a> |</li> <li class="right" > <a href="varnishtest.html" title="varnishtest" >previous</a> |</li> <li class="nav-item nav-item-0"><a href="../index.html">Varnish version 5.2.1 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.4.9. </div> </body> </html>