Commit 549a56b2 authored by Kristian Lyngstøl's avatar Kristian Lyngstøl

generate section 1 man pages from rst

fix some rst2man rendering issues

git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@5010 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent b39db7f6
......@@ -4,7 +4,9 @@ INCLUDES = -I$(top_srcdir)/include
bin_PROGRAMS = varnishadm
if HAVE_RST2MAN
dist_man_MANS = varnishadm.1
endif
varnishadm_SOURCES = \
varnishadm.c
......@@ -14,3 +16,13 @@ varnishadm_LDADD = \
$(top_builddir)/lib/libvarnishapi/libvarnishapi.la \
$(top_builddir)/lib/libvarnishcompat/libvarnishcompat.la \
${PTHREAD_LIBS} ${NET_LIBS}
%.1: ../../doc/sphinx/reference/%.rst
if HAVE_RST2MAN
${RST2MAN} $< >$@
else
@echo "========================================"
@echo "You need rst2man installed to make dist"
@echo "========================================"
@false
endif
.\"-
.\" Copyright (c) 2006 Verdens Gang AS
.\" Copyright (c) 2006-2009 Linpro AS
.\" All rights reserved.
.\"
.\" Author: Cecilie Fritzvold <cecilihf@linpro.no>
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $Id$
.\"
.Dd January 31, 2008
.Dt VARNISHADM 1
.Os
.Sh NAME
.Nm varnishadm
.Nd Control a running varnish instance
.Sh SYNOPSIS
.Nm
.Op Fl t Ar timeout
.Op Fl S Ar secret_file
.Fl T Ar address Ns : Ns Ar port
.Op Cm command Op Ar ...
.Sh DESCRIPTION
The
.Nm
utility establishes a CLI connection using the
.Fl T
and
.Fl S
arguments.
.Pp
If a
.Cm command
is given, the command and arguments are sent over the
CLI connection and the result returned on stdout.
.Pp
If no
.Cm command
argument is given
.Nm
will pass commands and replies between the CLI socket and
stdin/stdout.
.Pp
The following options are available:
.Bl -tag -width Fl
.It Fl t Ar timeout
Wait no longer than this many seconds for an operation to finish.
.It Fl S Ar secret_file
Specify the authentication secret file.
.Pp
This should be the same -S argument as was given to
.Nm varnishd .
.Pp
Only processes which can read the contents of this file, will be able
to authenticate the CLI connection.
.It Fl T Ar address Ns : Ns Ar port
Connect to the management interface at the specified address and port.
.El
.Pp
Available commands and parameters are documented in the
.Xr varnishd 1
manual page.
Additionally, a summary of commands can be obtained by issuing the
.Cm help
command, and a summary of parameters can be obtained by issuing the
.Cm param.show
command.
.Sh EXIT STATUS
If a
.Cm command
is given,
the exit status of the
.Nm
utility is zero if the command succeeded, and non-zero otherwise.
.Sh EXAMPLES
Some ways you can use varnishadm:
.Pp
.Dl varnishadm -T localhost:999 -S /var/db/secret vcl.use foo
.Pp
.Dl echo vcl.use foo | varnishadm -T localhost:999 -S /var/db/secret
.Pp
.Dl echo vcl.use foo | ssh vhost varnishadm -T localhost:999 -S /var/db/secret
.Sh SEE ALSO
.Xr varnishd 1
.Sh HISTORY
The
.Nm
utility and this manual page were written by
.An Cecilie Fritzvold Aq cecilihf@linpro.no .
......@@ -4,7 +4,9 @@ INCLUDES = -I$(top_srcdir)/include
sbin_PROGRAMS = varnishd
if HAVE_RST2MAN
dist_man_MANS = varnishd.1
endif
varnishd_SOURCES = \
cache_acceptor.c \
......@@ -100,3 +102,13 @@ default_vcl.h: default.vcl Makefile
# Explicitly record dependency
mgt_vcc.c: default_vcl.h
%.1: ../../doc/sphinx/reference/%.rst
if HAVE_RST2MAN
${RST2MAN} $< >$@
else
@echo "========================================"
@echo "You need rst2man installed to make dist"
@echo "========================================"
@false
endif
This diff is collapsed.
......@@ -4,7 +4,9 @@ INCLUDES = -I$(top_srcdir)/include
bin_PROGRAMS = varnishhist
if HAVE_RST2MAN
dist_man_MANS = varnishhist.1
endif
varnishhist_SOURCES = varnishhist.c
......@@ -13,3 +15,13 @@ varnishhist_LDADD = \
$(top_builddir)/lib/libvarnishapi/libvarnishapi.la \
-lm \
${CURSES_LIBS} ${PTHREAD_LIBS}
%.1: ../../doc/sphinx/reference/%.rst
if HAVE_RST2MAN
${RST2MAN} $< >$@
else
@echo "========================================"
@echo "You need rst2man installed to make dist"
@echo "========================================"
@false
endif
.\"-
.\" Copyright (c) 2006 Verdens Gang AS
.\" Copyright (c) 2006-2009 Linpro AS
.\" All rights reserved.
.\"
.\" Author: Dag-Erling Smørgrav <des@des.no>
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $Id$
.\"
.Dd June 28, 2007
.Dt VARNISHHIST 1
.Os
.Sh NAME
.Nm varnishhist
.Nd Varnish request histogram
.Sh SYNOPSIS
.Nm
.Op Fl b
.Op Fl C
.Op Fl c
.Op Fl d
.Op Fl I Ar regex
.Op Fl i Ar tag
.Op Fl n Ar varnish_name
.Op Fl r Ar file
.Op Fl V
.Op Fl w Ar delay
.Op Fl X Ar regex
.Op Fl x Ar tag
.Sh DESCRIPTION
The
.Nm
utility reads
.Xr varnishd 1
shared memory logs and presents a continuously updated histogram
showing the distribution of the last
.Va N
requests by their processing.
The value of
.Va N
and the vertical scale are displayed in the top left corner.
The horizontal scale is logarithmic.
Hits are marked with a pipe character ("|"), and misses are marked
with a hash character ("#").
.Pp
The following options are available:
.Bl -tag -width Fl
.It Fl b
Include log entries which result from communication with a backend
server.
If neither
.Fl b
nor
.Fl c
is specified,
.Nm
acts as if they both were.
.It Fl C
Ignore case when matching regular expressions.
.It Fl c
Include log entries which result from communication with a client.
If neither
.Fl b
nor
.Fl c
is specified,
.Nm
acts as if they both were.
.It Fl d
Process old log entries on startup.
Normally,
.Nm
will only process entries which are written to the log after it
starts.
.It Fl I Ar regex
Include log entries which match the specified regular expression.
If neither
.Fl I
nor
.Fl i
is specified, all log entries are included.
.It Fl i Ar tag
Include log entries with the specified tag.
If neither
.Fl I
nor
.Fl i
is specified, all log entries are included.
.It Fl n
Specifies the name of the
.Nm varnishd
instance to get logs from.
If
.Fl n
is not specified, the host name is used.
.It Fl r Ar file
Read log entries from
.Ar file
instead of shared memory.
.It Fl V
Display the version number and exit.
.It Fl w Ar delay
Wait at least
.Ar delay
seconds between each update.
The default is 1.
.Ar file
instead of displaying them.
The file will be overwritten unless the
.Fl a
option was specified.
.It Fl X Ar regex
Exclude log entries which match the specified regular expression.
.It Fl x Ar tag
Exclude log entries with the specified tag.
.El
.Sh SEE ALSO
.Xr varnishd 1 ,
.Xr varnishlog 1 ,
.Xr varnishncsa 1 ,
.Xr varnishstat 1 ,
.Xr varnishtop 1
.Sh HISTORY
The
.Nm
utility was developed by
.An Poul-Henning Kamp Aq phk@phk.freebsd.dk
in cooperation with Verdens Gang AS and Linpro AS.
This manual page was written by
.An Dag-Erling Sm\(/orgrav Aq des@des.no .
......@@ -4,7 +4,9 @@ INCLUDES = -I$(top_srcdir)/include
bin_PROGRAMS = varnishlog
if HAVE_RST2MAN
dist_man_MANS = varnishlog.1
endif
varnishlog_SOURCES = varnishlog.c
......@@ -13,3 +15,13 @@ varnishlog_LDADD = \
$(top_builddir)/lib/libvarnishcompat/libvarnishcompat.la \
$(top_builddir)/lib/libvarnishapi/libvarnishapi.la \
${PTHREAD_LIBS}
%.1: ../../doc/sphinx/reference/%.rst
if HAVE_RST2MAN
${RST2MAN} $< >$@
else
@echo "========================================"
@echo "You need rst2man installed to make dist"
@echo "========================================"
@false
endif
.\"-
.\" Copyright (c) 2006 Verdens Gang AS
.\" Copyright (c) 2006-2009 Linpro AS
.\" All rights reserved.
.\"
.\" Author: Dag-Erling Smørgrav <des@des.no>
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $Id$
.\"
.Dd March 9, 2008
.Dt VARNISHLOG 1
.Os
.Sh NAME
.Nm varnishlog
.Nd Display Varnish logs
.Sh SYNOPSIS
.Nm
.Op Fl a
.Op Fl b
.Op Fl C
.Op Fl c
.Op Fl D
.Op Fl d
.Op Fl I Ar regex
.Op Fl i Ar tag
.Op Fl k Ar keep
.Op Fl n Ar varnish_name
.Op Fl o
.Op Fl P Ar file
.Op Fl r Ar file
.Op Fl s Ar num
.Op Fl u
.Op Fl V
.Op Fl w Ar file
.Op Fl X Ar regex
.Op Fl x Ar tag
.Op Ar tag Ar regex
.Sh DESCRIPTION
The
.Nm
utility reads and presents
.Xr varnishd 1
shared memory logs.
.Pp
The following options are available:
.Bl -tag -width Fl
.It Fl a
When writing to a file, append to it rather than overwrite it.
.It Fl b
Include log entries which result from communication with a backend
server.
If neither
.Fl b
nor
.Fl c
is specified,
.Nm
acts as if they both were.
.It Fl C
Ignore case when matching regular expressions.
.It Fl c
Include log entries which result from communication with a client.
If neither
.Fl b
nor
.Fl c
is specified,
.Nm
acts as if they both were.
.It Fl D
Daemonize.
.It Fl d
Process old log entries on startup.
Normally,
.Nm
will only process entries which are written to the log after it
starts.
.It Fl I Ar regex
Include log entries which match the specified regular expression.
If neither
.Fl I
nor
.Fl i
is specified, all log entries are included.
.It Fl i Ar tag
Include log entries with the specified tag.
If neither
.Fl I
nor
.Fl i
is specified, all log entries are included.
.It Fl k Ar num
Only show the first
.Nm num
log records.
.It Fl n
Specifies the name of the
.Nm varnishd
instance to get logs from.
If
.Fl n
is not specified, the host name is used.
.It Fl o
Group log entries by request ID.
This has no effect when writing to a file using the
.Fl w
option.
.It Fl P Ar file
Write the process's PID to the specified
.Ar file .
.It Fl r Ar file
Read log entries from
.Ar file
instead of shared memory.
.It Fl s Ar num
Skip the first
.Ar num
log records.
.It Fl u
Unbuffered output.
.It Fl V
Display the version number and exit.
.It Fl w Ar file
Write log entries to
.Ar file
instead of displaying them.
The file will be overwritten unless the
.Fl a
option was specified.
.Pp
If
.Nm
receives a
.Dv SIGHUP
while writing to a file, it will reopen the file, allowing the old one
to be rotated away.
.It Fl X Ar regex
Exclude log entries which match the specified regular expression.
.It Fl x Ar tag
Exclude log entries with the specified tag.
.El
.Pp
If the
.Fl o
option was specified, an additional
.Ar tag
and
.Ar regex
may be specified to select only requests which generated a log entry
with the given
.Ar tag
whose contents match the given
.Ar regex .
.Sh TAGS
The following log entry tags are currently defined:
.\" keep in sync with include/shmlog_tags.h
.\" XXX add descriptions
.Bl -tag -width 16
.It Dv Backend
.It Dv BackendClose
.It Dv BackendOpen
.It Dv BackendReuse
.It Dv BackendXID
.It Dv CLI
.It Dv ClientAddr
.It Dv Debug
.It Dv Error
.It Dv ExpBan
.It Dv ExpKill
.It Dv ExpPick
.It Dv Hit
.It Dv HitPass
.It Dv HttpError
.It Dv HttpGarbage
.It Dv Length
.It Dv ObjHeader
.It Dv ObjLostHeader
.It Dv ObjProtocol
.It Dv ObjRequest
.It Dv ObjResponse
.It Dv ObjStatus
.It Dv ObjURL
.It Dv ReqEnd
.It Dv ReqStart
.It Dv RxHeader
.It Dv RxLostHeader
.It Dv RxProtocol
.It Dv RxRequest
.It Dv RxResponse
.It Dv RxStatus
.It Dv RxURL
.It Dv SessionClose
.It Dv SessionOpen
.It Dv StatAddr
.It Dv StatSess
.It Dv TTL
.It Dv TxHeader
.It Dv TxLostHeader
.It Dv TxProtocol
.It Dv TxRequest
.It Dv TxResponse
.It Dv TxStatus
.It Dv TxURL
.It Dv VCL_acl
.It Dv VCL_call
.It Dv VCL_return
.It Dv VCL_trace
.It Dv WorkThread
.El
.Sh EXAMPLES
The following command line simply copies all log entries to a log
file:
.Bd -literal -offset 4n
$ varnishlog \-w /var/log/varnish.log
.Ed
.Pp
The following command line reads that same log file and displays
requests for the front page:
.Bd -literal -offset 4n
$ varnishlog \-r /var/log/varnish.log \-c \-o RxURL '^/$'
.Ed
.Sh SEE ALSO
.Xr varnishd 1 ,
.Xr varnishhist 1 ,
.Xr varnishncsa 1 ,
.Xr varnishstat 1 ,
.Xr varnishtop 1
.Sh HISTORY
The
.Nm
utility was developed by
.An Poul-Henning Kamp Aq phk@phk.freebsd.dk
in cooperation with Verdens Gang AS and Linpro AS.
This manual page was written by
.An Dag-Erling Sm\(/orgrav Aq des@des.no .
......@@ -4,7 +4,9 @@ INCLUDES = -I$(top_srcdir)/include
bin_PROGRAMS = varnishncsa
if HAVE_RST2MAN
dist_man_MANS = varnishncsa.1
endif
varnishncsa_SOURCES = varnishncsa.c
......@@ -13,3 +15,13 @@ varnishncsa_LDADD = \
$(top_builddir)/lib/libvarnishcompat/libvarnishcompat.la \
$(top_builddir)/lib/libvarnishapi/libvarnishapi.la \
${PTHREAD_LIBS}
%.1: ../../doc/sphinx/reference/%.rst
if HAVE_RST2MAN
${RST2MAN} $< >$@
else
@echo "========================================"
@echo "You need rst2man installed to make dist"
@echo "========================================"
@false
endif
.\"-
.\" Copyright (c) 2006 Verdens Gang AS
.\" Copyright (c) 2006-2009 Linpro AS
.\" All rights reserved.
.\"
.\" Author: Dag-Erling Smørgrav <des@des.no>
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $Id$
.\"
.Dd November 8, 2007
.Dt VARNISHNCSA 1
.Os
.Sh NAME
.Nm varnishncsa
.Nd Display Varnish logs in Apache / NCSA combined log format
.Sh SYNOPSIS
.Nm
.Op Fl a
.Op Fl b
.Op Fl C
.Op Fl c
.Op Fl D
.Op Fl d
.Op Fl f
.Op Fl I Ar regex
.Op Fl i Ar tag
.Op Fl n Ar varnish_name
.Op Fl P Ar file
.Op Fl r Ar file
.Op Fl V
.Op Fl w Ar file
.Op Fl X Ar regex
.Op Fl x Ar tag
.Sh DESCRIPTION
The
.Nm
utility reads
.Xr varnishd 1
shared memory logs and presents them in the Apache / NCSA
"combined" log format.
.Pp
The following options are available:
.Bl -tag -width Fl
.It Fl a
When writing to a file, append to it rather than overwrite it.
.It Fl b
Include log entries which result from communication with a backend
server.
If neither
.Fl b
nor
.Fl c
is specified,
.Nm
acts as if they both were.
.It Fl C
Ignore case when matching regular expressions.
.It Fl c
Include log entries which result from communication with a client.
If neither
.Fl b
nor
.Fl c
is specified,
.Nm
acts as if they both were.
.It Fl D
Daemonize.
.It Fl d
Process old log entries on startup.
Normally,
.Nm
will only process entries which are written to the log after it
starts.
.It Fl f
Prefer the
.Va X-Forwarded-For
HTTP header over
.Va client.ip
in the log output.
.It Fl I Ar regex
Include log entries which match the specified regular expression.
If neither
.Fl I
nor
.Fl i
is specified, all log entries are included.
.It Fl i Ar tag
Include log entries with the specified tag.
If neither
.Fl I
nor
.Fl i
is specified, all log entries are included.
.It Fl n
Specifies the name of the
.Nm varnishd
instance to get logs from.
If
.Fl n
is not specified, the host name is used.
.It Fl P Ar file
Write the process's PID to the specified
.Ar file .
.It Fl r Ar file
Read log entries from
.Ar file
instead of shared memory.
.It Fl V
Display the version number and exit.
.It Fl w Ar file
Write log entries to
.Ar file
instead of displaying them.
The file will be overwritten unless the
.Fl a
option was specified.
.Pp
If
.Nm
receives a
.Dv SIGHUP
while writing to a file, it will reopen the file, allowing the old one
to be rotated away.
.It Fl X Ar regex
Exclude log entries which match the specified regular expression.
.It Fl x Ar tag
Exclude log entries with the specified tag.
.El
.Sh SEE ALSO
.Xr varnishd 1 ,
.Xr varnishhist 1 ,
.Xr varnishlog 1 ,
.Xr varnishstat 1 ,
.Xr varnishtop 1 ,
.Sh HISTORY
The
.Nm
utility was developed by
.An Poul-Henning Kamp Aq phk@phk.freebsd.dk
in cooperation with Verdens Gang AS and Linpro AS.
This manual page was written by
.An Dag-Erling Sm\(/orgrav Aq des@des.no .
......@@ -4,7 +4,9 @@ INCLUDES = -I$(top_srcdir)/include
bin_PROGRAMS = varnishreplay
if HAVE_RST2MAN
dist_man_MANS = varnishreplay.1
endif
varnishreplay_SOURCES = \
varnishreplay.c
......@@ -14,3 +16,13 @@ varnishreplay_LDADD = \
$(top_builddir)/lib/libvarnishcompat/libvarnishcompat.la \
$(top_builddir)/lib/libvarnishapi/libvarnishapi.la \
${PTHREAD_LIBS} ${NET_LIBS}
%.1: ../../doc/sphinx/reference/%.rst
if HAVE_RST2MAN
${RST2MAN} $< >$@
else
@echo "========================================"
@echo "You need rst2man installed to make dist"
@echo "========================================"
@false
endif
.\"-
.\" Copyright (c) 2007-2009 Linpro AS
.\" All rights reserved.
.\"
.\" Author: Cecilie Fritzvold <cecilihf@linpro.no>
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $Id$
.\"
.Dd September 12, 2007
.Dt VARNISHREPLAY 1
.Os
.Sh NAME
.Nm varnishreplay
.Nd HTTP traffic replay tool
.Sh SYNOPSIS
.Nm
.Op Fl D
.Fl a Ar address Ns : Ns Ar port
.Fl r Ar file
.Sh DESCRIPTION
The
.Nm
utility parses varnish logs and attempts to reproduce the traffic.
.Pp
The following options are available:
.Bl -tag -width Fl
.It Fl a Ar address Ns : Ns Ar port
Send the traffic over tcp to this address and port.
This option is mandatory.
.It Fl D
Turn on debugging mode.
.It Fl r Ar file
Parse logs from this file.
This option is mandatory.
.El
.Sh SEE ALSO
.Xr varnishd 1 ,
.Xr varnishlog 1
.Sh HISTORY
The
.Nm
utility and this manual page were written by
.An Cecilie Fritzvold Aq cecilihf@linpro.no .
......@@ -4,7 +4,9 @@ INCLUDES = -I$(top_srcdir)/include
bin_PROGRAMS = varnishsizes
if HAVE_RST2MAN
dist_man_MANS = varnishsizes.1
endif
varnishsizes_SOURCES = varnishsizes.c
......@@ -13,3 +15,13 @@ varnishsizes_LDADD = \
$(top_builddir)/lib/libvarnishapi/libvarnishapi.la \
-lm \
${CURSES_LIBS} ${PTHREAD_LIBS}
%.1: ../../doc/sphinx/reference/%.rst
if HAVE_RST2MAN
${RST2MAN} $< >$@
else
@echo "========================================"
@echo "You need rst2man installed to make dist"
@echo "========================================"
@false
endif
.\"-
.\" Copyright (c) 2006 Verdens Gang AS
.\" Copyright (c) 2006-2009 Linpro AS
.\" All rights reserved.
.\"
.\" Author: Dag-Erling Smørgrav <des@des.no>
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $Id$
.\"
.Dd June 28, 2007
.Dt VARNISHSIZES 1
.Os
.Sh NAME
.Nm varnishsizes
.Nd Varnish request histogram
.Sh SYNOPSIS
.Nm
.Op Fl b
.Op Fl C
.Op Fl c
.Op Fl d
.Op Fl I Ar regex
.Op Fl i Ar tag
.Op Fl n Ar varnish_name
.Op Fl r Ar file
.Op Fl V
.Op Fl w Ar delay
.Op Fl X Ar regex
.Op Fl x Ar tag
.Sh DESCRIPTION
The
.Nm
utility reads
.Xr varnishd 1
shared memory logs and presents a continuously updated histogram
showing the distribution of the last
.Va N
requests by their processing.
The value of
.Va N
and the vertical scale are displayed in the top left corner.
The horizontal scale is logarithmic.
Hits are marked with a pipe character ("|"), and misses are marked
with a hash character ("#").
.Pp
The following options are available:
.Bl -tag -width Fl
.It Fl b
Include log entries which result from communication with a backend
server.
If neither
.Fl b
nor
.Fl c
is specified,
.Nm
acts as if they both were.
.It Fl C
Ignore case when matching regular expressions.
.It Fl c
Include log entries which result from communication with a client.
If neither
.Fl b
nor
.Fl c
is specified,
.Nm
acts as if they both were.
.It Fl d
Process old log entries on startup.
Normally,
.Nm
will only process entries which are written to the log after it
starts.
.It Fl I Ar regex
Include log entries which match the specified regular expression.
If neither
.Fl I
nor
.Fl i
is specified, all log entries are included.
.It Fl i Ar tag
Include log entries with the specified tag.
If neither
.Fl I
nor
.Fl i
is specified, all log entries are included.
.It Fl n
Specifies the name of the
.Nm varnishd
instance to get logs from.
If
.Fl n
is not specified, the host name is used.
.It Fl r Ar file
Read log entries from
.Ar file
instead of shared memory.
.It Fl V
Display the version number and exit.
.It Fl w Ar delay
Wait at least
.Ar delay
seconds between each update.
The default is 1.
.Ar file
instead of displaying them.
The file will be overwritten unless the
.Fl a
option was specified.
.It Fl X Ar regex
Exclude log entries which match the specified regular expression.
.It Fl x Ar tag
Exclude log entries with the specified tag.
.El
.Sh SEE ALSO
.Xr varnishd 1 ,
.Xr varnishlog 1 ,
.Xr varnishncsa 1 ,
.Xr varnishstat 1 ,
.Xr varnishtop 1
.Sh SIZESORY
The
.Nm
utility was developed by
.An Poul-Henning Kamp Aq phk@phk.freebsd.dk
in cooperation with Verdens Gang AS and Linpro AS.
This manual page was written by
.An Dag-Erling Sm\(/orgrav Aq des@des.no .
......@@ -4,7 +4,9 @@ INCLUDES = -I$(top_srcdir)/include
bin_PROGRAMS = varnishstat
if HAVE_RST2MAN
dist_man_MANS = varnishstat.1
endif
varnishstat_SOURCES = \
varnishstat.h \
......@@ -16,3 +18,13 @@ varnishstat_LDADD = \
$(top_builddir)/lib/libvarnishcompat/libvarnishcompat.la \
$(top_builddir)/lib/libvarnishapi/libvarnishapi.la \
${CURSES_LIBS} ${RT_LIBS} ${PTHREAD_LIBS}
%.1: ../../doc/sphinx/reference/%.rst
if HAVE_RST2MAN
${RST2MAN} $< >$@
else
@echo "========================================"
@echo "You need rst2man installed to make dist"
@echo "========================================"
@false
endif
.\"-
.\" Copyright (c) 2006 Verdens Gang AS
.\" Copyright (c) 2006-2009 Linpro AS
.\" All rights reserved.
.\"
.\" Author: Dag-Erling Smørgrav <des@des.no>
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $Id$
.\"
.Dd June 28, 2007
.Dt VARNISHSTAT 1
.Os
.Sh NAME
.Nm varnishstat
.Nd HTTP accelerator statistics
.Sh SYNOPSIS
.Nm
.Op Fl 1
.Op Fl f Ar field_list
.Op Fl l
.Op Fl n Ar varnish_name
.Op Fl V
.Op Fl w Ar delay
.Sh DESCRIPTION
The
.Nm
utility displays statistics from a running
.Xr varnishd 1
instance.
.Pp
The following options are available:
.Bl -tag -width Fl
.It Fl 1
Instead of presenting of a continuously updated display, print the
statistics once and exit.
.It Fl f
A comma separated list of the fields to display.
If it starts with '^' it is used as an exclusion list.
.It Fl l
Lists the available fields to use with the
.Fl f
option.
.It Fl n
Specifies the name of the
.Nm varnishd
instance to get logs from.
If
.Fl n
is not specified, the host name is used.
.It Fl V
Display the version number and exit.
.It Fl w Ar delay
Wait
.Ar delay
seconds between updates.
The default is 1.
.El
.Pp
The columns in the main display are, from left to right:
.Bl -enum
.It
Value
.It
Per-second average in the period since last update, or a period if the
value can not be averaged
.It
Per-second average over process lifetime, or a period if the value can
not be averaged
.It
Descriptive text
.El
.Pp
When using the
.Fl 1
option, the columns in the output are, from left to right:
.Bl -enum
.It
Symbolic entry name
.It
Value
.It
Per-second average over process lifetime, or a period if the value can
not be averaged
.It
Descriptive text
.El
.Sh SEE ALSO
.Xr varnishd 1 ,
.Xr varnishhist 1 ,
.Xr varnishlog 1 ,
.Xr varnishncsa 1 ,
.Xr varnishtop 1 ,
.Xr curses 3
.Sh HISTORY
The
.Nm
utility was originally developed by
.An Poul-Henning Kamp Aq phk@phk.freebsd.dk
in cooperation with Verdens Gang AS and Linpro AS, and later
substantially rewritten by
.An Dag-Erling Sm\(/orgrav Aq des@des.no .
This manual page was written by
.An Dag-Erling Sm\(/orgrav Aq des@des.no .
......@@ -9,7 +9,9 @@ INCLUDES = -I$(top_srcdir)/include
bin_PROGRAMS = varnishtest
if HAVE_RST2MAN
dist_man_MANS = varnishtest.1
endif
varnishtest_SOURCES = \
vtc.c \
......@@ -29,3 +31,13 @@ varnishtest_LDADD = \
EXTRA_DIST = $(top_srcdir)/bin/varnishtest/tests/*.vtc \
$(top_srcdir)/bin/varnishtest/tests/README
%.1: ../../doc/sphinx/reference/%.rst
if HAVE_RST2MAN
${RST2MAN} $< >$@
else
@echo "========================================"
@echo "You need rst2man installed to make dist"
@echo "========================================"
@false
endif
.\"-
.\" Copyright (c) 2008-2009 Linpro AS
.\" All rights reserved.
.\"
.\" Author: Stig Sandbeck Mathisen <ssm@linpro.no>
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $Id$
.\"
.Dd February 13, 2009
.Dt VARNISHTEST 1
.Os
.Sh NAME
.Nm varnishtest
.Nd Test program for Varnish
.Sh SYNOPSIS
.Nm
.Op Fl n Ar iter
.Op Fl q
.Op Fl v
.Ar file
.Op Ar file ...
.Sh DESCRIPTION
The
.Nm
program is a script driven program used to test the varnish HTTP
accelerator.
.Pp
The
.Nm
program, when started and given one or more script files, can create a
number of threads representing backends, some threads representing
clients, and a varnishd process.
.Pp
The following options are available:
.Bl -tag -width Fl
.It Fl n Ar iter
Run
.Ar iter
number of iterations.
.It Fl q
Be quiet.
.It Fl v
Be verbose.
.It Ar file
File to use as a script
.El
.Sh SCRIPTS
.Ss Example script
.Bd -literal -offset 4n
# Start a varnish instance called "v1"
varnish v1 \-arg "\-b localhost:9080" \-start
# Create a server thread called "s1"
server s1 {
# Receive a request
rxreq
# Send a standard response
txresp \-hdr "Connection: close" \-body "012345\\n"
}
# Start the server thread
server s1 \-start
# Create a client thread called "c1"
client c1 {
# Send a request
txreq \-url "/"
# Wait for a response
rxresp
# Insist that it be a success
expect resp.status == 200
}
# Run the client
client c1 \-run
# Wait for the server to die
server s1 \-wait
# (Forcefully) Stop the varnish instance.
varnish v1 \-stop
.Ed
.Ss Example script output
The output, running this script looks as follows.
.Pp
The "bargraph" at the beginning of the line is an indication of the
level of detail in the line.
.Pp
The second field where the message comes from
.Pp
The rest of the line is anyones guess :-)
.Bd -literal -offset 4n
# TEST tests/b00000.vtc starting
### v1 CMD: cd ../varnishd && ./varnishd \-d \-d \-n v1 \-a :9081 \-T :9001 \-b localhost:9080
### v1 opening CLI connection
#### v1 debug| NB: Storage size limited to 2GB on 32 bit architecture,\\n
#### v1 debug| NB: otherwise we could run out of address space.\\n
#### v1 debug| storage_file: filename: ./varnish.Shkoq5 (unlinked) size 2047 MB.\\n
### v1 CLI connection fd = 3
#### v1 CLI TX| start
#### v1 debug| Using old SHMFILE\\n
#### v1 debug| Notice: locking SHMFILE in core failed: Operation not permitted\\n
#### v1 debug| bind(): Address already in use\\n
#### v1 debug| rolling(1)...
#### v1 debug| \\n
#### v1 debug| rolling(2)...\\n
#### v1 debug| Debugging mode, enter "start" to start child\\n
### v1 CLI 200 <start>
## s1 Starting server
### s1 listen on :9080 (fd 6)
## c1 Starting client
## c1 Waiting for client
## s1 started on :9080
## c1 started
### c1 connect to :9081
### c1 connected to :9081 fd is 8
#### c1 | GET / HTTP/1.1\\r\\n
#### c1 | \\r\\n
### c1 rxresp
#### s1 Accepted socket 7
### s1 rxreq
#### s1 | GET / HTTP/1.1\\r\\n
#### s1 | X-Varnish: 422080121\\r\\n
#### s1 | X-Forwarded-For: 127.0.0.1\\r\\n
#### s1 | Host: localhost\\r\\n
#### s1 | \\r\\n
#### s1 http[ 0] | GET
#### s1 http[ 1] | /
#### s1 http[ 2] | HTTP/1.1
#### s1 http[ 3] | X-Varnish: 422080121
#### s1 http[ 4] | X-Forwarded-For: 127.0.0.1
#### s1 http[ 5] | Host: localhost
#### s1 | HTTP/1.1 200 Ok\\r\\n
#### s1 | Connection: close\\r\\n
#### s1 | \\r\\n
#### s1 | 012345\\n
#### s1 | \\r\\n
## s1 ending
#### c1 | HTTP/1.1 200 Ok\\r\\n
#### c1 | Content-Length: 9\\r\\n
#### c1 | Date: Mon, 16 Jun 2008 22:16:55 GMT\\r\\n
#### c1 | X-Varnish: 422080121\\r\\n
#### c1 | Age: 0\\r\\n
#### c1 | Via: 1.1 varnish\\r\\n
#### c1 | Connection: keep-alive\\r\\n
#### c1 | \\r\\n
#### c1 http[ 0] | HTTP/1.1
#### c1 http[ 1] | 200
#### c1 http[ 2] | Ok
#### c1 http[ 3] | Content-Length: 9
#### c1 http[ 4] | Date: Mon, 16 Jun 2008 22:16:55 GMT
#### c1 http[ 5] | X-Varnish: 422080121
#### c1 http[ 6] | Age: 0
#### c1 http[ 7] | Via: 1.1 varnish
#### c1 http[ 8] | Connection: keep-alive
#### c1 EXPECT resp.status (200) == 200 (200) match
## c1 ending
## s1 Waiting for server
#### v1 CLI TX| stop
### v1 CLI 200 <stop>
# TEST tests/b00000.vtc completed
.Ed
.Pp
If instead of 200 we had expected 201 with the line:
.Bd -literal -offset 4n
expect resp.status == 201
.Ed
.Pp
The output would have ended with:
.Bd -literal -offset 4n
#### c1 http[ 0] | HTTP/1.1
#### c1 http[ 1] | 200
#### c1 http[ 2] | Ok
#### c1 http[ 3] | Content-Length: 9
#### c1 http[ 4] | Date: Mon, 16 Jun 2008 22:26:35 GMT
#### c1 http[ 5] | X-Varnish: 648043653 648043652
#### c1 http[ 6] | Age: 6
#### c1 http[ 7] | Via: 1.1 varnish
#### c1 http[ 8] | Connection: keep-alive
---- c1 EXPECT resp.status (200) == 201 (201) failed
.Ed
.Sh SEE ALSO
.Xr varnishhist 1 ,
.Xr varnishlog 1 ,
.Xr varnishncsa 1 ,
.Xr varnishstat 1 ,
.Xr varnishtop 1 ,
.Xr vcl 7
.Sh HISTORY
The
.Nm
program was developed by
.An Poul-Henning Kamp Aq phk@phk.freebsd.dk
in cooperation with Linpro AS.
This manual page was written by
.An Stig Sandbeck Mathisen Aq ssm@linpro.no
using examples by
.An Poul-Henning Kamp Aq phk@phk.freebsd.dk .
......@@ -4,7 +4,9 @@ INCLUDES = -I$(top_srcdir)/include
bin_PROGRAMS = varnishtop
if HAVE_RST2MAN
dist_man_MANS = varnishtop.1
endif
varnishtop_SOURCES = varnishtop.c
......@@ -12,3 +14,13 @@ varnishtop_LDADD = \
$(top_builddir)/lib/libvarnishcompat/libvarnishcompat.la \
$(top_builddir)/lib/libvarnishapi/libvarnishapi.la \
${CURSES_LIBS} ${PTHREAD_LIBS}
%.1: ../../doc/sphinx/reference/%.rst
if HAVE_RST2MAN
${RST2MAN} $< >$@
else
@echo "========================================"
@echo "You need rst2man installed to make dist"
@echo "========================================"
@false
endif
.\"-
.\" Copyright (c) 2006 Verdens Gang AS
.\" Copyright (c) 2006-2009 Linpro AS
.\" All rights reserved.
.\"
.\" Author: Dag-Erling Smørgrav <des@des.no>
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $Id$
.\"
.Dd June 28, 2007
.Dt VARNISHTOP 1
.Os
.Sh NAME
.Nm varnishtop
.Nd Varnish log entry ranking
.Sh SYNOPSIS
.Nm
.Op Fl 1
.Op Fl b
.Op Fl C
.Op Fl c
.Op Fl d
.Op Fl f
.Op Fl I Ar regex
.Op Fl i Ar tag
.Op Fl n Ar varnish_name
.Op Fl r Ar file
.Op Fl V
.Op Fl X Ar regex
.Op Fl x Ar tag
.Sh DESCRIPTION
The
.Nm
utility reads
.Xr varnishd 1
shared memory logs and presents a continuously updated list of the
most commonly occurring log entries.
With suitable filtering using the
.Fl I ,
.Fl i ,
.Fl X
and
.Fl x
options, it can be used to display a ranking of requested documents,
clients, user agents, or any other information which is recorded in
the log.
.Pp
The following options are available:
.Bl -tag -width Fl
.It Fl 1
Instead of presenting of a continuously updated display, print the
statistics once and exit.
Implies
.Fl d .
.It Fl b
Include log entries which result from communication with a backend
server.
If neither
.Fl b
nor
.Fl c
is specified,
.Nm
acts as if they both were.
.It Fl C
Ignore case when matching regular expressions.
.It Fl c
Include log entries which result from communication with a client.
If neither
.Fl b
nor
.Fl c
is specified,
.Nm
acts as if they both were.
.It Fl d
Process old log entries on startup.
Normally,
.Nm
will only process entries which are written to the log after it
starts.
.It Fl f
Sort and group only on the first field of each log entry.
This is useful when displaying e.g.
.Dv stataddr
entries, where the first field is the client IP address.
.It Fl I Ar regex
Include log entries which match the specified regular expression.
If neither
.Fl I
nor
.Fl i
is specified, all log entries are included.
.It Fl i Ar tag
Include log entries with the specified tag.
If neither
.Fl I
nor
.Fl i
is specified, all log entries are included.
.It Fl n
Specifies the name of the
.Nm varnishd
instance to get logs from.
If
.Fl n
is not specified, the host name is used.
.It Fl r Ar file
Read log entries from
.Ar file
instead of shared memory.
.It Fl V
Display the version number and exit.
.It Fl X Ar regex
Exclude log entries which match the specified regular expression.
.It Fl x Ar tag
Exclude log entries with the specified tag.
.El
.Sh EXAMPLES
The following example displays a continuously updated list of the most
frequently requested URLs:
.Bd -literal
varnishtop \-i RxURL
.Ed
.Pp
The following example displays a continuously updated list of the most
commonly used user agents:
.Bd -literal
varnishtop \-i RxHeader \-C \-I \\^User-Agent
.Ed
.Sh SEE ALSO
.Xr varnishd 1 ,
.Xr varnishhist 1 ,
.Xr varnishlog 1 ,
.Xr varnishncsa 1 ,
.Xr varnishstat 1
.Sh HISTORY
The
.Nm
utility was originally developed by
.An Poul-Henning Kamp Aq phk@phk.freebsd.dk
in cooperation with Verdens Gang AS and Linpro AS, and later
substantially rewritten by
.An Dag-Erling Sm\(/orgrav Aq des@des.no .
This manual page was written by
.An Dag-Erling Sm\(/orgrav Aq des@des.no .
......@@ -29,6 +29,11 @@ if test "x$XSLTPROC" = "xno"; then
AC_MSG_WARN([xsltproc not found – not building documentation])
fi
AM_CONDITIONAL(HAVE_XSLTPROC,[test "x$XSLTPROC" != "xno"])
AC_CHECK_PROGS(RST2MAN, [rst2man], "no")
if test "x$RST2MAN" = "xno"; then
AC_MSG_WARN([rst2man not found – not building man pages])
fi
AM_CONDITIONAL(HAVE_RST2MAN,[test "x$RST2MAN" != "xno"])
# Checks for libraries.
save_LIBS="${LIBS}"
......
......@@ -31,13 +31,16 @@ replies between the CLI socket and stdin/stdout.
OPTIONS
=======
-t timeout Wait no longer than this many seconds for an operation to finish.
-t timeout
Wait no longer than this many seconds for an operation to finish.
-S secret_file Specify the authentication secret file. This should be the same -S
argument as was given to varnishd. Only processes which can read
the contents of this file, will be able to authenticate the CLI connection.
-S secret_file
Specify the authentication secret file. This should be the same -S
argument as was given to varnishd. Only processes which can read
the contents of this file, will be able to authenticate the CLI connection.
-T address:port Connect to the management interface at the specified address and port.
-T address:port
Connect to the management interface at the specified address and port.
Available commands and parameters are documented in the varnishd(1)
......
......@@ -233,7 +233,8 @@ purge.list
purge.url regexp
Immediately invalidate all documents whose URL matches the specified regular expression.
quit Close the connection to the varnish admin port.
quit
Close the connection to the varnish admin port.
start
Start the Varnish cache process if it is not already running.
......@@ -247,7 +248,8 @@ stats
status
Check the status of the Varnish cache process.
stop Stop the Varnish cache process.
stop
Stop the Varnish cache process.
url.purge regexp
Deprecated, see purge.url instead.
......
......@@ -2,16 +2,16 @@
varnishhist
===========
-------------------------
Varnish request histogram
-------------------------
:Author: Dag-Erling Smørgrav
:Date: 2010-05-31
:Version: 1.0
:Manual section: 1
-------------------------
Varnish request histogram
-------------------------
SYNOPSIS
========
......
......@@ -2,16 +2,16 @@
varnishncsa
===========
---------------------------------------------------------
Display Varnish logs in Apache / NCSA combined log format
---------------------------------------------------------
:Author: Dag-Erling Smørgrav
:Date: 2010-05-31
:Version: 1.0
:Manual section: 1
---------------------------------------------------------
Display Varnish logs in Apache / NCSA combined log format
---------------------------------------------------------
SYNOPSIS
========
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment