[4.1] bdf1235 Parameters cleanup
Federico G. Schwindt
fgsch at lodoss.net
Fri Sep 4 15:54:51 CEST 2015
commit bdf1235857c9734d6ec21db10c119dcdc4b48442
Author: Federico G. Schwindt <fgsch at lodoss.net>
Date: Tue Jul 28 23:30:38 2015 +0100
Parameters cleanup
Add missing ones, make the order consistent and remove deprecated
options. More to come.
diff --git a/bin/varnishd/mgt/mgt_main.c b/bin/varnishd/mgt/mgt_main.c
index 0ae5338..37b1985 100644
--- a/bin/varnishd/mgt/mgt_main.c
+++ b/bin/varnishd/mgt/mgt_main.c
@@ -141,15 +141,15 @@ usage(void)
#define FMT " %-28s # %s\n"
fprintf(stderr, "usage: varnishd [options]\n");
- fprintf(stderr, FMT, "-a address:port", "HTTP listen address and port"
- " (default: *:80)");
+ fprintf(stderr, FMT, "-a address:port,proto",
+ "HTTP listen address and port (default: *:80)");
fprintf(stderr, FMT, "-b address:port", "backend address and port");
fprintf(stderr, FMT, "", " -b <hostname_or_IP>");
fprintf(stderr, FMT, "", " -b '<hostname_or_IP>:<port_or_service>'");
fprintf(stderr, FMT, "-C", "print VCL code compiled to C language");
fprintf(stderr, FMT, "-d", "debug");
- fprintf(stderr, FMT, "-f file", "VCL script");
fprintf(stderr, FMT, "-F", "Run in foreground");
+ fprintf(stderr, FMT, "-f file", "VCL script");
fprintf(stderr, FMT, "-h kind[,hashoptions]", "Hash specification");
fprintf(stderr, FMT, "", " -h critbit [default]");
fprintf(stderr, FMT, "", " -h simple_list");
@@ -162,15 +162,17 @@ usage(void)
#endif
fprintf(stderr, FMT, "", " -j unix[,user=<user>][,ccgroup=<group>]");
fprintf(stderr, FMT, "", " -j none");
- fprintf(stderr, FMT, "-l shl,free,fill", "Size of shared memory file");
+ fprintf(stderr, FMT, "-l shl,free", "Size of shared memory file");
fprintf(stderr, FMT, "", " shl: space for SHL records [80m]");
fprintf(stderr, FMT, "", " free: space for other allocations [1m]");
- fprintf(stderr, FMT, "", " fill: prefill new file [+]");
- fprintf(stderr, FMT, "-M address:port", "Reverse CLI destination.");
+ fprintf(stderr, FMT, "-M address:port", "Reverse CLI destination");
fprintf(stderr, FMT, "-n dir", "varnishd working directory");
fprintf(stderr, FMT, "-P file", "PID file");
fprintf(stderr, FMT, "-p param=value", "set parameter");
- fprintf(stderr, FMT, "-r param[,param...]", "make parameter read-only");
+ fprintf(stderr, FMT,
+ "-r param[,param...]", "make parameter read-only");
+ fprintf(stderr, FMT, "-S secret-file",
+ "Secret file for CLI authentication");
fprintf(stderr, FMT,
"-s [name=]kind[,options]", "Backend storage specification");
fprintf(stderr, FMT, "", " -s malloc[,<size>]");
@@ -181,12 +183,10 @@ usage(void)
fprintf(stderr, FMT, "", " -s file,<dir_or_file>,<size>");
fprintf(stderr, FMT, "",
" -s file,<dir_or_file>,<size>,<granularity>");
- fprintf(stderr, FMT, "", " -s persist{experimental}");
- fprintf(stderr, FMT, "-S secret-file",
- "Secret file for CLI authentication");
+ fprintf(stderr, FMT, "", " -s persistent (experimental)");
fprintf(stderr, FMT, "-T address:port",
"Telnet listen address and port");
- fprintf(stderr, FMT, "-t", "Default TTL");
+ fprintf(stderr, FMT, "-t TTL", "Default TTL");
fprintf(stderr, FMT, "-V", "version");
fprintf(stderr, FMT, "-W waiter", "Waiter implementation");
#if defined(HAVE_KQUEUE)
@@ -541,12 +541,12 @@ main(int argc, char * const *argv)
case 'd':
d_flag++;
break;
- case 'f':
- f_arg = optarg;
- break;
case 'F':
F_flag = 1 - F_flag;
break;
+ case 'f':
+ f_arg = optarg;
+ break;
case 'h':
h_arg = optarg;
break;
@@ -591,19 +591,19 @@ main(int argc, char * const *argv)
MCF_ParamProtect(cli, optarg);
cli_check(cli);
break;
+ case 'S':
+ S_arg = optarg;
+ break;
case 's':
s_arg_given = 1;
STV_Config(optarg);
break;
- case 't':
- MCF_ParamSet(cli, "default_ttl", optarg);
- break;
- case 'S':
- S_arg = optarg;
- break;
case 'T':
T_arg = optarg;
break;
+ case 't':
+ MCF_ParamSet(cli, "default_ttl", optarg);
+ break;
case 'V':
/* XXX: we should print the ident here */
VCS_Message("varnishd");
diff --git a/doc/sphinx/reference/varnishd.rst b/doc/sphinx/reference/varnishd.rst
index 05b04da..33d60f6 100644
--- a/doc/sphinx/reference/varnishd.rst
+++ b/doc/sphinx/reference/varnishd.rst
@@ -15,7 +15,7 @@ HTTP accelerator daemon
SYNOPSIS
========
-varnishd [-a address[:port][,PROTO]] [-b host[:port]] [-C] [-d] [-f config] [-F] [-g group] [-h type[,options]] [-i identity] [-l shl[,free[,fill]]] [-M address:port] [-n name] [-P file] [-p param=value] [-r param[,param...] [-s [name=]kind[,options]] [-S secret-file] [-T address[:port]] [-t TTL] [-u user] [-V]
+varnishd [-a address[:port][,PROTO]] [-b host[:port]] [-C] [-d] [-F] [-f config] [-h type[,options]] [-i identity] [-j jail[,jailoptions]] [-l shl[,free]] [-M address:port] [-n name] [-P file] [-p param=value] [-r param[,param...]] [-S secret-file] [-s [name=]kind[,options]] [-T address[:port]] [-t TTL] [-V] [-W waiter]
DESCRIPTION
===========
@@ -58,6 +58,10 @@ OPTIONS
started explicitly with a CLI command. Terminating the parent
process will also terminate the child.
+-F
+
+ Do not fork, run in the foreground.
+
-f config
Use the specified VCL configuration file instead of the builtin
@@ -66,16 +70,6 @@ OPTIONS
When neither a -f nor a -b argument are given, `varnishd` will not
start the worker process but process cli commands.
--F
-
- Do not fork, run in the foreground.
-
--g group
-
- Specifies the name of an unprivileged group to which the child
- process should switch before it starts accepting connections. This
- is a shortcut for specifying the group run-time parameter.
-
-h <type[,options]>
Specifies the hash algorithm. See `Hash Algorithm Options`_ for a
@@ -90,12 +84,12 @@ OPTIONS
Specify the jailing technology to use.
--l <shl[,free[,fill]]>
+-l <shl[,free]>
Specifies size of shmlog file. shl is the store for the shared
- memory log records [80M], free is the store for other allocations
- [1M] and fill determines how the log is [+]. Scaling suffixes like
- 'k', 'M' can be used up to (E)xabytes. Default is 80 Megabytes.
+ memory log records [80M] and free is the store for other allocations
+ [1M]. Scaling suffixes like 'k', 'M' can be used up to (E)xabytes.
+ Default is 81 Megabytes.
-M <address:port>
@@ -129,6 +123,12 @@ OPTIONS
*vcc_allow_inline_c* read only as these can potentially be used to
escalate privileges from the CLI.
+-S file
+
+ Path to a file containing a secret used for authorizing access to
+ the management port. If not provided a new secret will be drawn
+ from the system PRNG.
+
-s <[name=]type[,options]>
Use the specified storage backend, see `Storage Backend Options`_.
@@ -136,12 +136,6 @@ OPTIONS
This option can be used multiple times to specify multiple storage
files. Names are referenced in logs, VCL, statistics, etc.
--S file
-
- Path to a file containing a secret used for authorizing access to
- the management port. If not provided a new secret will be drawn
- from the system PRNG.
-
-T <address[:port]>
Offer a management interface on the specified address and port. See
@@ -152,19 +146,14 @@ OPTIONS
Specifies the default time to live (TTL) for cached objects. This is
a shortcut for specifying the *default_ttl* run-time parameter.
--u user
-
- Specifies the name of an unprivileged user to which the child
- process should switch before it starts accepting connections. This
- is a shortcut for specifying the user runtime parameter.
-
- If specifying both a user and a group, the user should be specified
- first.
-
-V
Display the version number and exit.
+-W
+
+ Specifies the waiter type to use.
+
.. _opt_h:
Hash Algorithm Options
More information about the varnish-commit
mailing list