static int opt_displayflag= 0;
static int opt_analyze= 0;
static char *opt_servers= NULL;
+static char *stat_args= NULL;
static char *analyze_mode= NULL;
static struct option long_options[]=
{
+ {(OPTIONSTRING)"args", required_argument, NULL, OPT_STAT_ARGS},
{(OPTIONSTRING)"version", no_argument, NULL, OPT_VERSION},
{(OPTIONSTRING)"help", no_argument, NULL, OPT_HELP},
{(OPTIONSTRING)"verbose", no_argument, &opt_verbose, OPT_VERBOSE},
}
else
{
- rc= memcached_stat_execute(memc, NULL, stat_printer, NULL);
+ rc= memcached_stat_execute(memc, stat_args, stat_printer, NULL);
}
free(opt_servers);
case OPT_SERVERS: /* --servers or -s */
opt_servers= strdup(optarg);
break;
+ case OPT_STAT_ARGS:
+ stat_args= strdup(optarg);
+ break;
case OPT_ANALYZE: /* --analyze or -a */
opt_analyze= OPT_ANALYZE;
analyze_mode= (optarg) ? strdup(optarg) : NULL;
case OPT_USERNAME: return "Username to use for SASL authentication";
case OPT_PASSWD: return "Password to use for SASL authentication";
case OPT_FILE: return "Path to file in which to save result";
+ case OPT_STAT_ARGS: return "Argument for statistics";
default: WATCHPOINT_ASSERT(0);
};