4

I have just installed memcache on (not memcached) on Ubuntu 14.04 via

sudo pecl install memcache

the module is showing as loaded in phpinfo output.
But I cant see if the daemon is running.
I have tried

  • sudo ps -e | grep memcache
  • sudo ps -e | grep memcache
  • sudo service memcache status -> sudo: /etc/init.d/memcache: command not found
  • sudo /etc/init.d/memcache status -> memcache: unrecognized service

Most google searches give instructions for memcached which doesnt work for me

how can i check if memcache is running?

the_velour_fog
  • 527
  • 2
  • 4
  • 14

3 Answers3

7

You have only installed the PHP language bindings, which allow PHP to communicate with memcached. You haven't actually installed memcached. If you want to run memcached, you will need to install it. (And there is no such daemon as memcache.)

Michael Hampton
  • 252,907
4

Could it be your memcached binary is deleted or you haven't installed the memcached package yet?

➜ ~ which memcached
/usr/bin/memcached
➜  ~  service memcached status
 * memcached is running
➜  ~  lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 14.04.2 LTS
Release:    14.04
Codename:   trusty
1

First thing to do is check and see if the port is listening:

netstat -anp | grep LISTEN | grep mem

Next check to make sure it is not stalled:

echo "stats" | nc localhost 11211 or what ever host/port yours is listening on.

source: https://briansnelson.com/Check_if_Memcached_is_Running