开发者

Can memcache tell you how much memory it is using?

开发者 https://www.devze.com 2023-02-13 05:38 出处:网络
Can memcac开发者_Go百科he tell you how much memory it is using in total? How about for a particular key?And on the command line, you could do this:

Can memcac开发者_Go百科he tell you how much memory it is using in total?

How about for a particular key?


And on the command line, you could do this:

echo "stats" | nc 127.0.0.1 11211 | grep bytes


In php, but I'm sure you are able to translate to RoR:-

echo "You are using " . $memcache->getstats()["bytes"] . " of storage ";
echo "out of " . $memcache->getstats()["limit_maxbytes"];

See http://php.net/manual/en/memcache.getstats.php

0

精彩评论

暂无评论...
验证码 换一张
取 消