How do I know if memcached is running

Muddy Boots

Active member
Late to the party but for future reference if you have SSH access (VPS or Dedicated) then in ssh to see if memcached is installed and running

Code:
netstat -anp | grep LISTEN | grep mem

This will return something like this showing the port if memcached is listening

Code:
tcp        0      0 127.0.0.1:11211         0.0.0.0:*               LISTEN      1662/memcached

11211 is the standard port for memcached

Then you can look at the stats using the port from above

Code:
echo "stats" | nc localhost 11211

Which should return something like this if running

Code:
STAT pid 1662
STAT uptime 594998
STAT time 1652895447
STAT version 1.6.5
STAT libevent 2.1.8-stable
STAT pointer_size 64
STAT rusage_user 93.585634
STAT rusage_system 59.152299
STAT max_connections 2048
STAT curr_connections 1
STAT total_connections 2
STAT rejected_connections 0
STAT connection_structures 2
STAT response_obj_bytes 1168
STAT response_obj_total 1
STAT response_obj_free 0
STAT response_obj_oom 0
STAT read_buf_bytes 16384
STAT read_buf_bytes_free 0
STAT read_buf_oom 0
STAT reserved_fds 20
STAT cmd_get 0
STAT cmd_set 0
STAT cmd_flush 0
STAT cmd_touch 0
STAT cmd_meta 0
STAT get_hits 0
STAT get_misses 0
STAT get_expired 0
STAT get_flushed 0
STAT delete_misses 0
STAT delete_hits 0
STAT incr_misses 0
STAT incr_hits 0
STAT decr_misses 0
STAT decr_hits 0
STAT cas_misses 0
STAT cas_hits 0
STAT cas_badval 0
STAT touch_hits 0
STAT touch_misses 0
STAT auth_cmds 0
STAT auth_errors 0
STAT bytes_read 6
STAT bytes_written 0
STAT limit_maxbytes 8388608
STAT accepting_conns 1
STAT listen_disabled_num 0
STAT time_in_listen_disabled_us 0
STAT threads 4
STAT conn_yields 0
STAT hash_power_level 16
STAT hash_bytes 524288
STAT hash_is_expanding 0
STAT slab_reassign_rescues 0
STAT slab_reassign_chunk_rescues 0
STAT slab_reassign_evictions_nomem 0
STAT slab_reassign_inline_reclaim 0
STAT slab_reassign_busy_items 0
STAT slab_reassign_busy_deletes 0
STAT slab_reassign_running 0
STAT slabs_moved 0
STAT lru_crawler_running 0
STAT lru_crawler_starts 49725
STAT lru_maintainer_juggles 594901
STAT malloc_fails 0
STAT log_worker_dropped 0
STAT log_worker_written 0
STAT log_watcher_skipped 0
STAT log_watcher_sent 0
STAT bytes 0
STAT curr_items 0
STAT total_items 0
STAT slab_global_page_pool 0
STAT expired_unfetched 0
STAT evicted_unfetched 0
STAT evicted_active 0
STAT evictions 0
STAT reclaimed 0
STAT crawler_reclaimed 0
STAT crawler_items_checked 0
STAT lrutail_reflocked 0
STAT moves_to_cold 0
STAT moves_to_warm 0
STAT moves_within_lru 0
STAT direct_reclaims 0
STAT lru_bumps_dropped 0
END
 
Top