Ruby on rails memcache能告诉你它使用了多少内存吗?
memcache能告诉您它总共使用了多少内存吗Ruby on rails memcache能告诉你它使用了多少内存吗?,ruby-on-rails,memcached,Ruby On Rails,Memcached,memcache能告诉您它总共使用了多少内存吗 对于一个特定的键如何?在php中,但我相信您能够转换为RoR:- echo "You are using " . $memcache->getstats()["bytes"] . " of storage "; echo "out of " . $memcache->getstats()["limit_maxbytes"]; 请参见,在命令行上,您可以执行以下操作: echo "stats" | nc 127.0.0.1 11211
对于一个特定的键如何?在php中,但我相信您能够转换为RoR:-
echo "You are using " . $memcache->getstats()["bytes"] . " of storage ";
echo "out of " . $memcache->getstats()["limit_maxbytes"];
请参见,在命令行上,您可以执行以下操作:
echo "stats" | nc 127.0.0.1 11211 | grep bytes
这可能会将
$memcache->getstats()
替换为memcache.stats
,以确保彻底性,对于那些在使用Memcached时想要相同信息的人,你可以引用重置($Memcached->getstats())[“bytes”]
,结果相同