Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I see if memcached is already running on my chosen port?

Tags:

memcached

I am having some problems with memcached and one idea I am having is that perhaps it is already running on the port I am trying to run it on, started by some other user on our network. Is there a way to tell what memcached ports are currently in use?

like image 724
barclay Avatar asked Nov 06 '09 22:11

barclay


People also ask

Which port is used for memcached?

By default, UEM Server components such as DS, CN, API, and SSP talk over TCP on port 11211. When you install Memcached into your configuration, it automatically selects this port. If your network is locked down and ports must be unlocked manually, unlock port 11211 before you proceed with the installation.


2 Answers

To see if it is running you could also try telnetting into the port:

telnet localhost 11211 

If this works you will see the following (telling you that the given port is open):

Connected to localhost. Escape character is '^]'. 

Now if memcached IS running you can see some basic stats by issuing the given command:

stats 

If this fails you will know that memcached is not running.

like image 147
simoes Avatar answered Oct 02 '22 00:10

simoes


Try

netstat -ap | grep TheChosenPort# 

and see if anything is listening on those TCP or UDP ports.

like image 34
Sean A.O. Harney Avatar answered Oct 02 '22 01:10

Sean A.O. Harney