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. If the filename is -, logs
98              are read from the standard input. and cannot work as a daemon.
99
100       -t <seconds|off>
101              Timeout before returning error on initial VSM connection. If set
102              the  VSM  connection  is retried every 0.5 seconds for this many
103              seconds. If zero the connection is attempted only once and  will
104              fail  immediately  if unsuccessful. If set to "off", the connec‐
105              tion will not fail, allowing the utility to start and wait inde‐
106              finetely for the Varnish instance to appear.  Defaults to 5 sec‐
107              onds.
108
109       -T <seconds>
110              Sets the transaction timeout in seconds. This defines the  maxi‐
111              mum  number  of  seconds elapsed between a Begin tag and the End
112              tag. If the timeout expires, a warning record is synthesized and
113              the transaction is force completed. Defaults to 120 seconds.
114
115       -x <taglist>
116              Exclude  log  records  of  these  tags  in  output. Taglist is a
117              comma-separated list of tag globs. Multiple -x  options  may  be
118              given.
119
120       -X <[taglist:]regex>
121              Exclude  by  regex  matching.  Do  not  output  records matching
122              taglist and regular expression. Applies to any tag if taglist is
123              absent. Multiple -X options may be given.
124
125       -V     Print version information and exit.
126
127       --optstring
128              Print the optstring parameter to getopt(3) to help writing wrap‐
129              per scripts.
130

EXAMPLES

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

SEE ALSO

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

HISTORY

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