#include "sbuf.h"
#include "common_cli.h"
#include "mgt.h"
+#include "shmlog.h"
static int cli_i = -1, cli_o = -1;
static pthread_mutex_t cli_mtx;
mgt_start_child();
}
+/*--------------------------------------------------------------------*/
+
+static void
+mcf_stats(struct cli *cli, char **av, void *priv)
+{
+
+ (void)av;
+ (void)priv;
+
+ assert (VSL_stats != NULL);
+#define MAC_STAT(n,t,f,d) \
+ cli_out(cli, "%12ju " d "\n", (VSL_stats->n));
+#include "stat_field.h"
+#undef MAC_STAT
+}
+
+
/*--------------------------------------------------------------------
* Passthru of cli commands. It is more or less just undoing what
* the cli parser did, but such is life...
{ CLI_PING, cli_func_ping },
{ CLI_SERVER_START, mcf_server_startstop, NULL },
{ CLI_SERVER_STOP, mcf_server_startstop, &cli_proto },
+ { CLI_STATS, mcf_stats, NULL },
{ CLI_CONFIG_LOAD },
#if 0
{ CLI_CONFIG_LOAD, m_cli_func_config_load, NULL },
{ CLI_SERVER_STOP, m_cli_func_server_stop, NULL },
{ CLI_SERVER_RESTART },
{ CLI_PING, m_cli_func_ping, NULL },
- { CLI_STATS, m_cli_func_stats, NULL },
{ CLI_ZERO },
{ CLI_VERBOSE, m_cli_func_verbose, NULL },
{ CLI_EXIT, m_cli_func_exit, NULL},