1VARNISHHIST(1)                                                  VARNISHHIST(1)
2
3
4

NAME

6       varnishhist - Varnish request histogram
7

SYNOPSIS

9       varnishhist  [-B  <factor>]  [-C]  [-d]  [-g  <request|vxid>]  [-h] [-L
10       <limit>] [-n <dir>] [-p <period>] [-P  responsetime]  [-P  reqbodytime]
11       [-P  size]  [-P  Bereqtime]  [-P  Beresptime]  [-P  BerespBodytime] [-P
12       Besize] [-P <[cb:]tag:[prefix]:field_num[:min:max]>]  [-Q  <file>]  [-q
13       <query>] [-r <filename>] [-t <seconds|off>] [-T <seconds>] [-V]
14

DESCRIPTION

16       The  varnishhist  utility  reads  varnishd(1)  shared  memory  logs and
17       presents a continuously updated histogram showing the  distribution  of
18       the last N requests by their processing.  The value of N and the verti‐
19       cal scale are displayed in the top left corner.  The  horizontal  scale
20       is  logarithmic.   Hits  are  marked  with  a pipe character ("|"), and
21       misses are marked with a hash character ("#").
22
23       The following options are available:
24
25       -B <factor>
26              Factor to bend time by. Particularly useful when [-r]eading from
27              a  vsl  file.  =1  process in near real time, <1 slow-motion, >1
28              time-lapse (useless unless reading from a file). At  runtime,  <
29              halves and > doubles.
30
31       -C     Do all regular expression and string matching caseless.
32
33       -d     Process log records at the head of the log and exit.
34
35       -g <request|vxid>
36              The  grouping  of  the  log  records. The default is to group by
37              vxid.
38
39       -h     Print program usage and exit
40
41       -L <limit>
42              Sets the upper limit of incomplete transactions kept before  the
43              oldest  transaction is force completed. A warning record is syn‐
44              thesized when this happens. This setting keeps an upper bound on
45              the  memory  usage of running queries. Defaults to 1000 transac‐
46              tions.
47
48       -n <dir>
49              Specify the varnishd working directory (also known  as  instance
50              name) to get logs from. If -n is not specified, the host name is
51              used.
52
53       -p <period>
54              Specified  the  number  of  seconds  between  screen  refreshes.
55              Default  is  1 second, and can be changed at runtime by pressing
56              the [0-9] keys (powers of 2 in seconds or + and -  (double/halve
57              the speed).
58
59       -P responsetime
60              Predefined  client  profile:  graph the total time from start of
61              request processing (first byte received) until ready to  deliver
62              the client response (field 3 of SLT_Timestamp Process: VSL tag).
63
64       -P reqbodytime
65              Predefined  client  profile:  graph  the  time  for  reading the
66              request body (field 3 of SLT_Timestamp ReqBody: VSL tag).
67
68       -P size
69              Predefined client profile: graph the size of responses (field  5
70              of SLT_ReqAcct  VSL tag).
71
72       -P Bereqtime
73              Predefined  backend  profile:  graph  the time from beginning of
74              backend processing until a backend request  is  sent  completely
75              (field 3 of SLT_Timestamp Bereq: VSL tag).
76
77       -P Beresptime
78              Predefined  backend  profile:  graph  the time from beginning of
79              backend processing until the response headers are being received
80              completely (field 3 of SLT_Timestamp Beresp: VSL tag).
81
82       -P BerespBodytime
83              Predefined  backend  profile:  graph  the time from beginning of
84              backend processing until the response  body  has  been  received
85              (field 3 of SLT_Timestamp BerespBody: VSL tag).
86
87       -P Besize
88              Predefined backend profile: graph the backend response body size
89              (field 5 of SLT_BereqAcct  VSL tag).
90
91       -P <[cb:]tag:[prefix]:field_num[:min:max]>
92              Graph the  given  custom  definition  defined  as:  an  optional
93              (c)lient or (b)ackend filter (defaults to client), the tag we'll
94              look for, a prefix to look for (can be empty, but must be termi‐
95              nated  by  a  colon)  and  the  field number of the value we are
96              interested in. min and max are the boundaries of  the  graph  in
97              powers of ten and default to -6 and 3.
98
99       -Q <file>
100              Specifies  the file containing the VSL query to use. When multi‐
101              ple -Q or -q options are specified, all queries  are  considered
102              as if the 'or' operator was used to combine them.
103
104       -q <query>
105              Specifies  the  VSL query to use. When multiple -q or -Q options
106              are specified, all queries are considered as if the 'or'  opera‐
107              tor was used to combine them.
108
109       -r <filename>
110              Read  log  in binary file format from this file. The file can be
111              created with varnishlog -w filename.
112
113       -t <seconds|off>
114              Timeout before returning error on initial VSM connection. If set
115              the  VSM  connection  is retried every 0.5 seconds for this many
116              seconds. If zero the connection is attempted only once and  will
117              fail  immediately  if unsuccessful. If set to "off", the connec‐
118              tion will not fail, allowing the utility to start and wait inde‐
119              finetely for the Varnish instance to appear.  Defaults to 5 sec‐
120              onds.
121
122       -T <seconds>
123              Sets the transaction timeout in seconds. This defines the  maxi‐
124              mum  number  of  seconds elapsed between a Begin tag and the End
125              tag. If the timeout expires, a warning record is synthesized and
126              the transaction is force completed. Defaults to 120 seconds.
127
128       -V     Print version information and exit.
129
130       --optstring
131              Print the optstring parameter to getopt(3) to help writing wrap‐
132              per scripts.
133

SEE ALSO

135       · varnishd(1)
136
137       · varnishlog(1)
138
139       · varnishncsa(1)
140
141       · varnishstat(1)
142
143       · varnishtop(1)
144
145       · vsl(7)
146

HISTORY

148       The varnishhist utility was developed by Poul-Henning Kamp in  coopera‐
149       tion with Verdens Gang AS and Varnish Software AS. This manual page was
150       written by Dag-Erling Smørgrav.
151
153       This document is licensed under the same licence as Varnish itself. See
154       LICENCE for details.
155
156       · Copyright (c) 2006 Verdens Gang AS
157
158       · Copyright (c) 2006-2015 Varnish Software AS
159
160
161
162
163                                                                VARNISHHIST(1)
Impressum