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

NAME

6       varnishtop - Varnish log entry ranking
7

SYNOPSIS

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

EXAMPLES

122       The  following example displays a continuously updated list of the most
123       frequently requested URLs:
124
125          varnishtop -i ReqURL
126
127       The following example displays a continuously updated list of the  most
128       commonly used user agents:
129
130          varnishtop -C -I ReqHeader:User-Agent
131

SEE ALSO

133       · varnishd(1)
134
135       · varnishhist(1)
136
137       · varnishlog(1)
138
139       · varnishncsa(1)
140
141       · varnishstat(1)
142

HISTORY

144       The varnishtop utility was originally developed by Poul-Henning Kamp in
145       cooperation with Verdens Gang AS and Varnish  Software  AS,  and  later
146       substantially  rewritten  by Dag-Erling Smørgrav.  This manual page was
147       written by Dag-Erling Smørgrav, and later updated by Martin Blix Gryde‐
148       land.
149
151       This document is licensed under the same licence as Varnish itself. See
152       LICENCE for details.
153
154       · Copyright (c) 2006 Verdens Gang AS
155
156       · Copyright (c) 2006-2015 Varnish Software AS
157
158
159
160
161                                                                 VARNISHTOP(1)
Impressum