Commit 2d29ba98 authored by Cecilie Fritzvold's avatar Cecilie Fritzvold

Added a new cli option, status, for checking the status of the varnish child...

Added a new cli option, status, for checking the status of the varnish child process. This is for use in the webmin plugin.


git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@1674 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 246edb5c
......@@ -445,3 +445,13 @@ mcf_server_startstop(struct cli *cli, char **av, void *priv)
cli_out(cli, "Child in state %s", ch_state[child_state]);
}
}
/*--------------------------------------------------------------------*/
void
mcf_server_status(struct cli *cli, char **av, void *priv)
{
(void)av;
(void)priv;
cli_out(cli, "Child is state %s", ch_state[child_state]);
}
......@@ -140,6 +140,7 @@ static struct cli_proto *cli_proto;
/* XXX: what order should this list be in ? */
static struct cli_proto mgt_cli_proto[] = {
{ CLI_PING, cli_func_ping },
{ 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 },
......
......@@ -31,6 +31,7 @@
/* mgt_child.c */
cli_func_t mcf_server_startstop;
cli_func_t mcf_server_status;
/* mgt_param.c */
cli_func_t mcf_param_show;
......
......@@ -316,6 +316,8 @@ All the numbers presented are totals since server startup; for a
better idea of the current situation, use the
.Xr varnishstat 1
utility.
.It Cm status
Check the status of the child process.
.It Cm stop
Stop the child process.
.It Cm url.purge Ar regexp
......
......@@ -211,6 +211,12 @@
"\tClose connection", \
0, 0
# define CLI_SERVER_STATUS \
"status", \
"status", \
"\tCheck status of Varnish cache process.", \
0, 0
/*
* Status/return codes in the CLI protocol
*/
......
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