char *temp;
if ((temp= getenv("MEMCACHED_SERVERS")))
+ {
opt_servers= strdup(temp);
+ }
else
{
fprintf(stderr, "No Servers provided\n");
{
printf(" -%c, --%s%c\n", long_options[x].val, long_options[x].name,
long_options[x].has_arg ? '=' : ' ');
+
if ((help_message= (char *)ms_lookup_help(long_options[x].val)) != NULL)
{
printf(" %s\n", help_message);
{
if (ms_setting.srv_str == NULL)
{
- fprintf(stderr, "No Servers provided.\n\n");
- return -1;
+ char *temp;
+
+ if ((temp= getenv("MEMCACHED_SERVERS")))
+ {
+ ms_setting.srv_str= strdup(temp);
+ }
+ else
+ {
+ fprintf(stderr, "No Servers provided\n\n");
+ return -1;
+ }
}
if (ms_setting.nconns % ms_setting.nthreads != 0)
*/
static void ms_print_setting()
{
+ fprintf(stdout, "servers : %s\n", ms_setting.srv_str);
fprintf(stdout, "threads count: %d\n", ms_setting.nthreads);
fprintf(stdout, "concurrency: %d\n", ms_setting.nconns);
if (ms_setting.run_time > 0)
=over 4
+=item servers : 127.0.0.1:11211
+
=item threads count: 1
=item concurrency: 16
=over 4
+=item servers : "servers"
+
+The servers used by memslap.
+
=item threads count
The number of threads memslap runs with.