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

EXAMPLES

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

SEE ALSO

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

HISTORY

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