Unify -n argument documentation

The host name default referenced by VUT_OPT_n is long gone since
879c9b37

Refer to varnishd(1) to avoid the documentation getting out of sync.

Ref #4105
parent d0cd96d2
......@@ -388,7 +388,7 @@ static void v_noreturn_
usage(int status)
{
fprintf(stderr,
"Usage: varnishadm [-h] [-n ident] [-p] [-S secretfile] "
"Usage: varnishadm [-h] [-n workdir] [-p] [-S secretfile] "
"[-T [address]:port] [-t timeout] [command [...]]\n");
fprintf(stderr, "\t-n is mutually exclusive with -S and -T\n");
exit(status);
......
......@@ -19,17 +19,17 @@ Control a running Varnish instance
SYNOPSIS
========
varnishadm [-h] [-n ident] [-p] [-S secretfile] [-T [address]:port] [-t timeout] [command [...]]
varnishadm [-h] [-n workdir] [-p] [-S secretfile] [-T [address]:port] [-t timeout] [command [...]]
DESCRIPTION
===========
The `varnishadm` utility establishes a CLI connection to varnishd either
using -n *name* or using the -T and -S arguments. If -n *name* is
given the location of the secret file and the address:port is looked
up in shared memory. If neither is given `varnishadm` will look for an
instance without a given name.
using -n *workdir* or using the -T and -S arguments. If -n *workdir* is
given, the location of the secret file and the address:port are looked
up in shared memory. If neither is given, `varnishadm` uses the -n
defaults documented for :ref:`varnishd(1)`.
If a command is given, the command and arguments are sent over the CLI
connection and the result returned on stdout.
......@@ -43,8 +43,11 @@ OPTIONS
-h
Print program usage and exit.
-n ident
Connect to the instance of `varnishd` with this name.
-n workdir
Specify the varnish working directory of the instance to attach
to. See :ref:`varnishd(1)` ``-n`` option documentation for
additional information and defaults.
-p
Force `pass` mode and make the output follow the VCLI protocol.
......
......@@ -70,7 +70,7 @@ The Varnish way:
When varnishd starts, it opens locked shared memory files, advising to
use different -n arguments if an attempt is made to run multiple
varnishd instances with the same name.
varnishd instances on the same working directory.
Child processes each use their own shared memory files, since a worker
process restart marks a clean break in operation anyway.
......
......@@ -129,11 +129,9 @@ data.
in the service's ``[Service]]`` section of the unit file.
Once you have the core, ``cd`` into varnish's working directory (as
given by the ``-n`` parameter, whose default is
``$PREFIX/var/varnish/$HOSTNAME`` with ``$PREFIX`` being the
installation prefix, usually ``/usr/local``, open the core with
``gdb`` and issue the command ``bt`` to get a stack trace of the
thread that caused the segfault.
given by the ``-n`` parameter (see :ref:`varnishd(1)` for defaults),
open the core with ``gdb`` and issue the command ``bt`` to get a stack
trace of the thread that caused the segfault.
A basic debug session for varnish installed under ``/usr/local`` could look
like this::
......
......@@ -69,10 +69,10 @@
)
#define VUT_OPT_n \
VOPT("n:", "[-n <dir>]", "varnishd working directory", \
"Specify the varnishd working directory (also known as" \
" instance name) to get logs from. If -n is not specified," \
" the host name is used." \
VOPT("n:", "[-n <workdir>]", "varnish working directory", \
"Specify the varnish working directory of the instance " \
"to attach to. See :ref:`varnishd(1)` ``-n`` option " \
"documentation for additional information and defaults." \
)
#define VUT_OPT_Q \
......
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