Commit 24d90483 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Remove the CLI::stats command.

This was added as a quick-ish hack back in 1.0 days, but it was never
meant to be a primary interface for getting stats information, and
using it as such leads to problems.

The CLI is single-threaded and any kind of TCP trouble from a client
polling stats information would cause the CLI to get stuck, preventing
any other kind of management from happening.

The trigger for this removal is that the stats implementation has
never learned to handle dynamic stats counters, and since this
as added a lot of new stats, the next thing you need filtering
facilites, paging etc.

All of that belongs in varnishstat, where it is already implemented,
and were its operation does not negatively impact the primary task
of varnish: service HTTP clients.

For reference we never made the mistake of showing the varnish-log
from the CLI.

See also ticket #925.
parent 6f72a59a
......@@ -70,25 +70,6 @@ static const char *secret_file;
/*--------------------------------------------------------------------*/
static void
mcf_stats(struct cli *cli, const char * const *av, void *priv)
{
(void)av;
(void)priv;
AN(VSC_main);
#define VSC_DO_MAIN
#define VSC_F(n, t, l, f, d) \
if (VSC_main->n != 0) \
cli_out(cli, "%12ju %s\n", (VSC_main->n), d);
#include "vsc_fields.h"
#undef VSC_F
#undef VSC_DO_MAIN
}
/*--------------------------------------------------------------------*/
static void
mcf_banner(struct cli *cli, const char *const *av, void *priv)
{
......@@ -115,7 +96,6 @@ static struct cli_proto cli_proto[] = {
{ CLI_SERVER_STATUS, "", mcf_server_status, NULL },
{ CLI_SERVER_START, "", mcf_server_startstop, NULL },
{ CLI_SERVER_STOP, "", mcf_server_startstop, cli_proto },
{ CLI_STATS, "", mcf_stats, NULL },
{ CLI_VCL_LOAD, "", mcf_config_load, NULL },
{ CLI_VCL_INLINE, "", mcf_config_inline, NULL },
{ CLI_VCL_USE, "", mcf_config_use, NULL },
......
......@@ -30,8 +30,6 @@ varnish v1 -start
varnish v1 -cliok "help"
varnish v1 -cliok "stats"
varnish v1 -cliok "param.set waiter default"
varnish v1 -clierr 106 "param.set waiter HASH(0x8839c4c)"
......@@ -16,5 +16,4 @@ client c1 {
expect resp.status == 200
} -run
varnish v1 -cliok stats
varnish v1 -expect n_wrk == 8
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