1VARNISHTOP(1)                                                    VARNISHTOP(1)
2
3
4

NAME

6       varnishtop - Varnish log entry ranking
7

SYNOPSIS

9       varnishtop  [-1]  [-b]  [-c]  [-C]  [-d]  [-E]  [-f]  [-g  <session|re‐
10       quest|vxid|raw>]  [-h]  [-i  <taglist>]  [-I   <[taglist:]regex>]   [-L
11       <limit>]  [-n  <dir>] [-p <period>] [-Q <file>] [-q <query>] [-r <file‐
12       name>]  [-t  <seconds|off>]   [-T   <seconds>]   [-x   <taglist>]   [-X
13       <[taglist:]regex>] [-V]
14

DESCRIPTION

16       The  varnishtop  utility  reads  varnishd(1)  shared  memory  logs  and
17       presents a continuously updated list of the most commonly occurring log
18       entries.   With suitable filtering using the -I, -i, -X and -x options,
19       it can be used to display a ranking of  requested  documents,  clients,
20       user agents, or any other information which is recorded in the log.
21
22       The following options are available:
23
24       -1     Instead  of a continuously updated display, print the statistics
25              once and exit. Implies -d.
26
27       -b     Only display transactions and log records  coming  from  backend
28              communication.
29
30       -c     Only  display  transactions  and  log records coming from client
31              communication.
32
33       -C     Do all regular expression and string matching caseless.
34
35       -d     Process log records at the head of the log.
36
37       -E     Display ESI transactions and other client transactions.
38
39       -f     Sort and group only on the first field of each  log  entry.  For
40              log  entries  in the form prefix: value it is the prefix without
41              the colon that is sorted and grouped. This is useful  when  dis‐
42              playing  e.g.  ReqStart  entries,  where  the first field is the
43              client IP address.
44
45       -g <session|request|vxid|raw>
46              The grouping of the log records. The  default  is  to  group  by
47              vxid.
48
49       -h     Print program usage and exit
50
51       -i <taglist>
52              Include  log  records  of  these  tags  in  output. Taglist is a
53              comma-separated list of tag globs. Multiple -i  options  may  be
54              given.
55
56              If  a  tag  include option is the first of any tag selection op‐
57              tions, all tags are first marked excluded.
58
59       -I <[taglist:]regex>
60              Include by regex matching. Output only records matching  taglist
61              and regular expression. Applies to any tag if taglist is absent.
62              Multiple -I options may be given.
63
64              If a tag include option is the first of any  tag  selection  op‐
65              tions, all tags are first marked excluded.
66
67       -L <limit>
68              Sets  the upper limit of incomplete transactions kept before the
69              oldest transaction is force completed. A warning record is  syn‐
70              thesized when this happens. This setting keeps an upper bound on
71              the memory usage of running queries. Defaults to  1000  transac‐
72              tions.
73
74       -n <dir>
75              Specify  the  varnishd working directory (also known as instance
76              name) to get logs from. If -n is not specified, the host name is
77              used.
78
79       -p <period>
80              Specified  the number of seconds to measure over, the default is
81              60 seconds. The first number in the list is the  average  number
82              of  requests  seen over this time period. This option has no ef‐
83              fect if -1 option is also used.
84
85       -Q <file>
86              Specifies the file containing the VSL query to use. When  multi‐
87              ple  -Q  or -q options are specified, all queries are considered
88              as if the 'or' operator was used to combine them.
89
90       -q <query>
91              Specifies the VSL query to use. When multiple -q or  -Q  options
92              are  specified, all queries are considered as if the 'or' opera‐
93              tor was used to combine them.
94
95       -r <filename>
96              Read log in binary file format from this file. The file  can  be
97              created with varnishlog -w filename.
98
99       -t <seconds|off>
100              Timeout before returning error on initial VSM connection. If set
101              the VSM connection is retried every 0.5 seconds  for  this  many
102              seconds.  If zero the connection is attempted only once and will
103              fail immediately if unsuccessful. If set to "off",  the  connec‐
104              tion will not fail, allowing the utility to start and wait inde‐
105              finetely for the Varnish instance to appear.  Defaults to 5 sec‐
106              onds.
107
108       -T <seconds>
109              Sets  the transaction timeout in seconds. This defines the maxi‐
110              mum number of seconds elapsed between a Begin tag  and  the  End
111              tag. If the timeout expires, a warning record is synthesized and
112              the transaction is force completed. Defaults to 120 seconds.
113
114       -x <taglist>
115              Exclude log records of  these  tags  in  output.  Taglist  is  a
116              comma-separated  list  of  tag globs. Multiple -x options may be
117              given.
118
119       -X <[taglist:]regex>
120              Exclude by  regex  matching.  Do  not  output  records  matching
121              taglist and regular expression. Applies to any tag if taglist is
122              absent. Multiple -X options may be given.
123
124       -V     Print version information and exit.
125
126       --optstring
127              Print the optstring parameter to getopt(3) to help writing wrap‐
128              per scripts.
129

EXAMPLES

131       The  following example displays a continuously updated list of the most
132       frequently requested URLs:
133
134          varnishtop -i ReqURL
135
136       The following example displays a continuously updated list of the  most
137       commonly used user agents:
138
139          varnishtop -C -I ReqHeader:User-Agent
140

SEE ALSO

142varnishd(1)
143
144varnishhist(1)
145
146varnishlog(1)
147
148varnishncsa(1)
149
150varnishstat(1)
151

HISTORY

153       The varnishtop utility was originally developed by Poul-Henning Kamp in
154       cooperation with Verdens Gang AS and Varnish  Software  AS,  and  later
155       substantially  rewritten  by Dag-Erling Smørgrav.  This manual page was
156       written by Dag-Erling Smørgrav, and later updated by Martin Blix Gryde‐
157       land.
158
160       This document is licensed under the same licence as Varnish itself. See
161       LICENCE for details.
162
163       • Copyright (c) 2006 Verdens Gang AS
164
165       • Copyright (c) 2006-2015 Varnish Software AS
166
167
168
169
170                                                                 VARNISHTOP(1)
Impressum