memcached

echo "stats" | nc -q 1 127.0.0.1 11211 | egrep 'maxbytes|maxconns|bytes |curr_items|evictions|reclaimed|hit_rate|cmd_get|cmd_set'

limit_maxbytes – maximum memory allowed. To change this, edit /etc/memcached.conf, change -n option.

bytes – currently used memory.

evictions – number of items Memcached had to evict because it ran out of memory (this is the strongest signal you need more RAM).​

To see stats, run

[root@centos-1gb-nyc1-01 ~]# echo "stats settings" | nc localhost 11211
STAT maxbytes 67108864
STAT maxconns 1024
STAT tcpport 11211
STAT udpport 11211
STAT inter NULL
STAT verbosity 0
STAT oldest 0
STAT evictions on
STAT domain_socket NULL
STAT umask 700
STAT growth_factor 1.25
STAT chunk_size 48
STAT num_threads 4
STAT num_threads_per_udp 4
STAT stat_key_prefix :
STAT detail_enabled no
STAT reqs_per_event 20
STAT cas_enabled yes
STAT tcp_backlog 1024
STAT binding_protocol auto-negotiate
STAT auth_enabled_sasl no
STAT item_size_max 1048576
STAT maxconns_fast no
STAT hashpower_init 0
STAT slab_reassign no
STAT slab_automove 0
END
[root@centos-1gb-nyc1-01 ~]# 

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *