{
printf(" -%c, --%s%c\n", long_options[x].val, long_options[x].name,
long_options[x].has_arg ? '=' : ' ');
{
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 ((help_message= (char *)ms_lookup_help(long_options[x].val)) != NULL)
{
printf(" %s\n", help_message);
if (ms_setting.nconns <= 0)
{
fprintf(stderr, "Concurrency must be greater than 0.:-)\n");
if (ms_setting.nconns <= 0)
{
fprintf(stderr, "Concurrency must be greater than 0.:-)\n");
if (ms_setting.exec_num <= 0)
{
fprintf(stderr, "Execute number must be greater than 0.:-)\n");
if (ms_setting.exec_num <= 0)
{
fprintf(stderr, "Execute number must be greater than 0.:-)\n");
if (ms_setting.nthreads <= 0)
{
fprintf(stderr, "Threads number must be greater than 0.:-)\n");
if (ms_setting.nthreads <= 0)
{
fprintf(stderr, "Threads number must be greater than 0.:-)\n");
if (ms_setting.mult_key_num <= 0)
{
fprintf(stderr, "Multi-get key number must be greater than 0.:-)\n");
if (ms_setting.mult_key_num <= 0)
{
fprintf(stderr, "Multi-get key number must be greater than 0.:-)\n");
if (ms_setting.sock_per_conn <= 0)
{
fprintf(stderr, "Number of socks of each concurrency "
if (ms_setting.sock_per_conn <= 0)
{
fprintf(stderr, "Number of socks of each concurrency "
- 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;
+ }