0

I've installed memcached and libmemcached-tools on ubuntu 18.04. Both of these commands work:

memcstat --servers=localhost
memcstat --servers=127.0.0.1

But in the man page for memcstat it says:

You can specify servers via the option:

--servers

or via the environment variable:

'MEMCACHED_SERVERS, --args'

I can't find any examples of how to set the MEMCACHED_SERVERS variable. I've tried:

MEMCACHED_SERVERS=127.0.0.1
MEMCACHED_SERVERS="127.0.0.1"
MEMCACHED_SERVERS="--args 127.0.0.1"
MEMCACHED_SERVERS="localhost"
MEMCACHED_SERVERS=localhost
MEMCACHED_SERVERS="--servers=localhost"

But all I get from memcstat is "No servers provided".

Kevin
  • 103
  • 4

1 Answers1

1

if you don't want to set an environment variable:

#> MEMCACHED_SERVERS='127.0.0.1' memcstat

otherwise:

#> export MEMCACHED_SERVERS='127.0.0.1'
#> memcstat
Marc
  • 121
  • 4