Commit 4788fa1b authored by Geoff Simmons's avatar Geoff Simmons

Remove the -N option, no longer available in the Varnish log API,

and update documentation.
parent d67b0920
......@@ -9,7 +9,7 @@ Tracking Log Reader demon
-------------------------
:Author: Geoffrey Simmons
:Date: 2017-03-17
:Date: 2017-09-08
:Version: trunk
:Manual section: 3
......@@ -17,7 +17,7 @@ SYNOPSIS
========
| trackrdrd [[-n varnish_name] | [-f varnish_binlog] | [-N vsm_file]]
| trackrdrd [[-n varnish_name] | [-f varnish_binlog]]
| [-c config_file] [-u user] [-P pid_file]
| [[-l log_file] | [-y syslog_facility]]
| [-L tx_limit] [-T tx_timeout]
......@@ -131,15 +131,8 @@ OPTIONS
i.e. the 'varnish name' indicating the directory containing
the mmap'd file used by varnishd for the shared memory log. By
default, the host name is assumed (as with varnishd). Also set
by the config parameter 'varnish.name'. The -n, -N and -f
options are mutually exclusive.
-N vsm_file
Same as the -N option for Varnish binaries; i.e. the full path
of a mmap'd VSM file, usually named ``_.vsm``. The default is
``-n hostname`` as explained above. Also set by the config
parameter 'varnish.file'. The -n. -N and -f options are
mutually exclusive.
by the config parameter 'varnish.name'. The -n and -f options
are mutually exclusive.
-c config_file
Path of a configuration file. If /etc/trackrdrd.conf exists
......@@ -179,12 +172,12 @@ OPTIONS
management (parent) process and worker (child) process.
-f varnish_binlog
A binary dump of the Varnish SHM log produced by
'varnishlog -B -w'. If this option is specified, trackrdrd
reads from the dump instead of a live SHM log (useful for
debugging and replaying traffic). The options -f, -n and -N
are mutually exclusive; -n is the default. Also set by the
config parameter 'varnish.bindump'.
A binary dump of the Varnish SHM log produced by 'varnishlog
-w'. If this option is specified, trackrdrd reads from the
dump instead of a live SHM log (useful for debugging and
replaying traffic). The options -f and -n are mutually
exclusive; -n is the default. Also set by the config parameter
'varnish.bindump'.
-L limit
Sets the upper limit of incomplete transactions kept by the
......@@ -221,7 +214,7 @@ Requirements
------------
This version of the tracking reader is compatible with Varnish since
version 5.1.0. ``trackrdrd`` is built against an existing Varnish
version 5.2. ``trackrdrd`` is built against an existing Varnish
installation on the same host, which in the standard case can be found
with usual settings for the ``PATH`` environment variable in the
``configure`` step described below.
......@@ -479,11 +472,8 @@ command-line options, as shown below.
Parameter CLI Option Description Default
==================== ========== ========================================================================================= =======
``varnish.name`` ``-n`` Like the ``-n`` option for Varnish, this is the directory containing the file that is default for Varnish (the host name)
mmap'd to the shared memory segment for the Varnish log. This parameter, ``varnish.file``
and ``varnish.bindump`` are mutually exclusive.
-------------------- ---------- ----------------------------------------------------------------------------------------- -------
``varnish.file`` ``-N`` Like the ``-N`` option for Varnish, this is the full path to the mmap'd shared memory default for Varnish (the host name)
file. This parameter, ``varnish.name`` and ``varnish.bindump`` are mutually exclusive.
mmap'd to the shared memory segment for the Varnish log. This parameter and
``varnish.bindump`` are mutually exclusive.
-------------------- ---------- ----------------------------------------------------------------------------------------- -------
``mq.module`` Name of the shared object implementing the MQ interface. May be an absolute path, or the None, this parameter is required.
SO name of a library that the dynamic linker finds according to the rules described in
......@@ -551,10 +541,10 @@ Parameter CLI Option Description
``syslog.facility`` ``-y`` See ``syslog(3)``; legal values are ``user`` or ``local0`` through ``local7``. This ``local0``
parameter and ``log.file`` are mutually exclusive.
-------------------- ---------- ----------------------------------------------------------------------------------------- -------
``varnish.bindump`` ``-f`` A binary dump of the Varnish shared memory log obtained from ``varnishlog -B -w``. If a
``varnish.bindump`` ``-f`` A binary dump of the Varnish shared memory log obtained from ``varnishlog -w``. If a
value is specified, ``trackrdrd`` reads from that file instead of a live Varnish log
(useful for testing, debugging and replaying traffic). This parameter ```varnish.name``
and ``varnish.file`` are mutually exclusive.
(useful for testing, debugging and replaying traffic). This parameter and
``varnish.name`` are mutually exclusive.
==================== ========== ========================================================================================= =======
LOGGING AND MONITORING
......
......@@ -6,14 +6,9 @@ pid.file = /var/run/trackrdrd.pid
# Varnish instance name, as used in the -n CLI option for varnishd
# and other Varnish binaries
# The config may specify only one of varnish.name, varnish.file or
# varnish.bindump
# The config may specify only one of varnish.name or varnish.bindump
varnish.name = $( hostname )
# Varnish VSM file -- full path of the file mmap'd to shared memory,
# as used in the -N CLI option for Varnish binaries
# varnish.file = $VARNISH_INSTALL/var/$INSTANCE_NAME/_.vsm
# Binary log dump obtained from 'varnishlog -B -w'
# varnish.bindump = /path/to/dump.file
......
......@@ -3,15 +3,8 @@
i.e. the 'varnish name' indicating the directory containing
the mmap'd file used by varnishd for the shared memory log. By
default, the host name is assumed (as with varnishd). Also set
by the config parameter 'varnish.name'. The -n, -N and -f
options are mutually exclusive.
-N vsm_file
Same as the -N option for Varnish binaries; i.e. the full path
of a mmap'd VSM file, usually named ``_.vsm``. The default is
``-n hostname`` as explained above. Also set by the config
parameter 'varnish.file'. The -n. -N and -f options are
mutually exclusive.
by the config parameter 'varnish.name'. The -n and -f options
are mutually exclusive.
-c config_file
Path of a configuration file. If /etc/trackrdrd.conf exists
......@@ -52,9 +45,9 @@
-f varnishlog_bindump
A binary dump of the Varnish SHM log produced by 'varnishlog
-B -w'. If this option is specified, trackrdrd reads from the
-w'. If this option is specified, trackrdrd reads from the
dump instead of a live SHM log (useful for debugging and
replaying traffic). The options -f, -n and -N are mutually
replaying traffic). The options -f and -n are mutually
exclusive; -n is the default. Also set by the config parameter
'varnish.bindump'.
......
......@@ -130,7 +130,6 @@ CONF_Add(const char *lval, const char *rval)
confString("pid.file", pid_file);
confString("varnish.name", varnish_name);
confString("varnish.file", vsmfile);
confString("log.file", log_file);
confString("varnish.bindump", varnish_bindump);
confString("mq.module", mq_module);
......@@ -224,7 +223,6 @@ CONF_Init(void)
strcpy(config.pid_file, "/var/run/trackrdrd.pid");
config.varnish_name[0] = '\0';
config.vsmfile[0] = '\0';
config.log_file[0] = '\0';
config.varnish_bindump[0] = '\0';
config.syslog_facility = LOG_LOCAL0;
......@@ -279,7 +277,6 @@ CONF_Dump(int level)
{
confdump(level, "pid.file = %s", config.pid_file);
confdump(level, "varnish.name = %s", config.varnish_name);
confdump(level, "varnish.file = %s", config.vsmfile);
confdump(level, "log.file = %s",
strcmp(config.log_file,"-") == 0 ? "stdout" : config.log_file);
confdump(level, "varnish.bindump = %s", config.varnish_bindump);
......
......@@ -60,11 +60,11 @@ function regress {
}
echo '... standard VCL_Log syntax'
regress 'varnish.binlog' '4116554635 333344' '1274763305 56045' \
regress 'varnish.binlog' '4193098095 333282' '1274763305 56045' \
'1485621276 46141'
echo '... legacy VCL_Log syntax'
regress 'varnish.legacy.binlog' '3787836061 375539' '3908916621 57319' \
regress 'varnish.legacy.binlog' '3334052518 375477' '3908916621 57319' \
'1139478852 48689'
exit 0
......@@ -222,8 +222,8 @@ main(int argc, char * const *argv)
{
int c, d_flag = 0, D_flag = 0, err;
const char *P_arg = NULL, *l_arg = NULL, *n_arg = NULL, *f_arg = NULL,
*y_arg = NULL, *c_arg = NULL, *u_arg = NULL, *N_arg = NULL,
*L_arg = NULL, *T_arg = NULL;
*y_arg = NULL, *c_arg = NULL, *u_arg = NULL, *L_arg = NULL,
*T_arg = NULL;
pid_t child_pid;
CONF_Init();
......@@ -235,7 +235,7 @@ main(int argc, char * const *argv)
}
cli_config_filename[0] = '\0';
while ((c = getopt(argc, argv, "u:P:Vn:hl:df:y:c:DN:L:T:")) != -1) {
while ((c = getopt(argc, argv, "u:P:Vn:hl:df:y:c:DL:T:")) != -1) {
switch (c) {
case 'P':
P_arg = optarg;
......@@ -246,9 +246,6 @@ main(int argc, char * const *argv)
case 'n':
n_arg = optarg;
break;
case 'N':
N_arg = optarg;
break;
case 'l':
l_arg = optarg;
break;
......@@ -293,9 +290,7 @@ main(int argc, char * const *argv)
exit(EXIT_FAILURE);
}
if (n_arg && N_arg)
usage(EXIT_FAILURE);
if (f_arg && (n_arg || N_arg))
if (f_arg && n_arg)
usage(EXIT_FAILURE);
if (l_arg && y_arg)
usage(EXIT_FAILURE);
......@@ -324,8 +319,6 @@ main(int argc, char * const *argv)
bprintf(config.log_file, "%s", l_arg);
if (f_arg)
bprintf(config.varnish_bindump, "%s", f_arg);
if (N_arg)
bprintf(config.vsmfile, "%s", N_arg);
if (L_arg && ((err = CONF_Add("tx.limit", L_arg)) != 0)) {
fprintf(stderr, "-L: %s\n", strerror(err));
......
......@@ -179,7 +179,6 @@ char cli_config_filename[PATH_MAX + 1];
struct config {
char pid_file[PATH_MAX];
char varnish_name[PATH_MAX];
char vsmfile[PATH_MAX];
char log_file[PATH_MAX];
char varnish_bindump[PATH_MAX];
char mq_module[PATH_MAX];
......
trackrdrd [[-n varnish_name] | [-f varnish_binlog] | [-N vsm_file]]
trackrdrd [[-n varnish_name] | [-f varnish_binlog]]
[-c config_file] [-u user] [-P pid_file]
[[-l log_file] | [-y syslog_facility]]
[-L tx_limit] [-T tx_timeout]
......
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