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