Commit 62764cac authored by Tollef Fog Heen's avatar Tollef Fog Heen

Rename -o to -m ; documentation

Rename -o added in last commit to -m, add documentation.
parent a69a4882
......@@ -315,6 +315,8 @@ main(int argc, char * const *argv)
case 'w':
w_arg = optarg;
break;
case 'm':
o_flag = 1; /* fall through */
default:
if (VSL_Arg(vd, c, optarg) > 0)
break;
......
......@@ -107,7 +107,7 @@ struct VSM_data *vd;
static size_t nll;
static int o_flag = 0;
static int m_flag = 0;
static const char *format;
......@@ -516,7 +516,7 @@ h_ncsa(void *priv, enum vsl_tag tag, unsigned fd,
if (!lp->complete)
return (reopen);
if (o_flag && !VSL_Matched(vd, lp->bitmap))
if (m_flag && !VSL_Matched(vd, lp->bitmap))
/* -o is in effect matching rule failed. Don't display */
return (reopen);
......@@ -775,11 +775,8 @@ main(int argc, char *argv[])
case 'c':
/* XXX: Silently ignored: it's required anyway */
break;
case 'o':
o_flag = 1;
if (VSL_Arg(vd, c, optarg) > 0)
break;
usage();
case 'm':
m_flag = 1; /* Fall through */
default:
if (VSL_Arg(vd, c, optarg) > 0)
break;
......
......@@ -335,8 +335,8 @@ main(int argc, char **argv)
case 'V':
varnish_version("varnishtop");
exit(0);
case 'o':
fprintf(stderr, "-o is not supported\n");
case 'm':
fprintf(stderr, "-m is not supported\n");
exit(1);
default:
if (VSL_Arg(vd, o, optarg) > 0)
......
......@@ -15,8 +15,8 @@ Varnish request histogram
SYNOPSIS
========
varnishhist [-b] [-C] [-c] [-d] [-I regex] [-i tag] [-n varnish_name]
[-r file] [-V] [-w delay] [-X regex] [-x tag]
varnishhist [-b] [-C] [-c] [-d] [-I regex] [-i tag] [-m tag:regex ...]
[-n varnish_name] [-r file] [-V] [-w delay] [-X regex] [-x tag]
DESCRIPTION
===========
......@@ -51,6 +51,9 @@ The following options are available:
-i tag Include log entries with the specified tag. If neither
-I nor -i is specified, all log entries are included.
-m tag:regex only count transactions where tag matches regex. Multiple
-m options are AND-ed together.
-n Specifies the name of the varnishd instance to get logs
from. If -n is not specified, the host name is used.
......
......@@ -17,7 +17,7 @@ SYNOPSIS
========
varnishlog [-a] [-b] [-C] [-c] [-D] [-d] [-I regex] [-i tag] [-k keep]
[-n varnish_name] [-o [tag regex]] [-P file] [-r file] [-s num] [-u] [-V]
[-n varnish_name] [-o] [-m tag:regex ...] [-P file] [-r file] [-s num] [-u] [-V]
[-w file] [-X regex] [-x tag]
DESCRIPTION
......@@ -51,6 +51,9 @@ The following options are available:
-k num Only show the first num log records.
-m tag:regex only list transactions where tag matches regex. Multiple
-m options are AND-ed together.
-n Specifies the name of the varnishd instance to get logs from. If -n is not
specified, the host name is used.
......
......@@ -16,7 +16,7 @@ SYNOPSIS
========
varnishncsa [-a] [-b] [-C] [-c] [-D] [-d] [-f] [-F format] [-I regex]
[-i tag] [-n varnish_name] [-o tag regex] [-P file] [-r file] [-V] [-w file]
[-i tag] [-n varnish_name] [-m tag:regex ...] [-P file] [-r file] [-V] [-w file]
[-X regex] [-x tag]
......@@ -110,8 +110,8 @@ The following options are available:
How the request was handled, whether it was a
cache hit, miss, pass, pipe or error.
-o Filter log output to request groups that match a regular
expression on a specified tag.
-m tag:regex only list records where tag matches regex. Multiple
-m options are AND-ed together.
-n Specifies the name of the varnishd instance to get logs
from. If -n is not specified, the host name is used.
......
......@@ -17,8 +17,8 @@ Varnish object size request histogram
SYNOPSIS
========
varnishsizes [-b] [-C] [-c] [-d] [-I regex] [-i tag] [-n varnish_name]
[-r file] [-V] [-w delay] [-X regex] [-x tag]
varnishsizes [-b] [-C] [-c] [-d] [-I regex] [-i tag] [-m tag:regex ...]
[-n varnish_name] [-r file] [-V] [-w delay] [-X regex] [-x tag]
DESCRIPTION
===========
......@@ -49,6 +49,9 @@ The following options are available:
-i tag Include log entries with the specified tag. If neither -I nor -i
is specified, all log entries are included.
-m tag:regex only list record where tag matches regex. Multiple -m
options are AND-ed together.
-n Specifies the name of the varnishd instance to get logs from.
If -n is not specified, the host name is used.
......
......@@ -214,7 +214,7 @@ int VSL_Open(struct VSM_data *vd, int diag);
* != 0 on failure
*/
#define VSL_ARGS "bCcdI:i:k:n:r:s:X:x:o:"
#define VSL_ARGS "bCcdI:i:k:n:r:s:X:x:m:"
#define VSL_b_USAGE "[-b]"
#define VSL_c_USAGE "[-c]"
#define VSL_C_USAGE "[-C]"
......@@ -222,8 +222,8 @@ int VSL_Open(struct VSM_data *vd, int diag);
#define VSL_i_USAGE "[-i tag]"
#define VSL_I_USAGE "[-I regexp]"
#define VSL_k_USAGE "[-k keep]"
#define VSL_m_USAGE "[-m tag:regex]"
#define VSL_n_USAGE VSM_n_USAGE
#define VSL_o_USAGE "[-o tag:regex]"
#define VSL_r_USAGE "[-r file]"
#define VSL_s_USAGE "[-s skip]"
#define VSL_x_USAGE "[-x tag]"
......@@ -232,8 +232,8 @@ int VSL_Open(struct VSM_data *vd, int diag);
VSL_i_USAGE " " \
VSL_I_USAGE " " \
VSL_k_USAGE " " \
VSL_m_USAGE " " \
VSL_n_USAGE " " \
VSL_o_USAGE " " \
VSL_r_USAGE " " \
VSL_s_USAGE " " \
VSL_X_USAGE " " \
......
......@@ -163,7 +163,7 @@ name2tag(const char *n)
}
static int
vsl_o_arg(const struct VSM_data *vd, const char *opt)
vsl_m_arg(const struct VSM_data *vd, const char *opt)
{
struct vsl_re_match *m;
const char *error;
......@@ -264,7 +264,7 @@ VSL_Arg(struct VSM_data *vd, int arg, const char *opt)
case 'r': return (vsl_r_arg(vd, opt));
case 's': return (vsl_s_arg(vd, opt));
case 'I': case 'X': return (vsl_IX_arg(vd, opt, arg));
case 'o': return (vsl_o_arg(vd, opt));
case 'm': return (vsl_m_arg(vd, opt));
case 'C': vd->vsl->regflags = VRE_CASELESS; return (1);
default:
return (0);
......
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