{"id":2357,"date":"2015-11-20T01:05:57","date_gmt":"2015-11-19T16:05:57","guid":{"rendered":"http:\/\/tech.akat.info\/?p=2357"},"modified":"2015-11-20T01:05:57","modified_gmt":"2015-11-19T16:05:57","slug":"memcached-tool%e3%82%92%e5%88%a9%e7%94%a8%e3%81%97%e3%81%a6%e3%83%87%e3%83%bc%e3%82%bf%e7%a7%bb%e5%8b%95","status":"publish","type":"post","link":"https:\/\/tech.akat.info\/?p=2357","title":{"rendered":"memcached-tool\u3092\u5229\u7528\u3057\u3066\u30c7\u30fc\u30bf\u79fb\u52d5"},"content":{"rendered":"<h1>memcached\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h1>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nroot@hostname:\/home\/shimizu# aptitude install memcached\r\n\u4ee5\u4e0b\u306e\u65b0\u898f\u30d1\u30c3\u30b1\u30fc\u30b8\u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u307e\u3059:\r\n  libevent-2.0-5{a} memcached\r\n...\r\n\r\nroot@hostname:\/home\/shimizu# memcached -h\r\nmemcached 1.4.21\r\n...\r\n<\/pre>\n<h1>memcached\u306bkey\u8ffd\u52a0\u3068\u78ba\u8a8d<\/h1>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nroot@hostname:\/home\/shimizu# telnet localhost 11211\r\nTrying ::1...\r\nTrying 127.0.0.1...\r\nConnected to localhost.\r\nEscape character is '^]'.\r\nset key 0 1000 5\r\nvalue\r\nSTORED\r\nget key\r\nVALUE key 0 5\r\nvalue\r\nEND\r\nquit\r\nConnection closed by foreign host.\r\n<\/pre>\n<h1>memcached-tool\u3092\u4f7f\u3063\u3066\u307f\u308b<\/h1>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nroot@hostname:\/home\/shimizu# \/usr\/share\/memcached\/scripts\/memcached-tool localhost:11211 display\r\n  #  Item_Size  Max_age   Pages   Count   Full?  Evicted Evict_Time OOM\r\n  1      96B        32s       1       1     yes        0        0    0\r\nroot@hostname:\/home\/shimizu# \/usr\/share\/memcached\/scripts\/memcached-tool localhost:11211 stats\r\n#localhost:11211   Field       Value\r\n         accepting_conns           1\r\n...\r\n<\/pre>\n<h1>memcached-tool\u3067\u30c0\u30f3\u30d7<\/h1>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nroot@hostname:\/home\/shimizu# \/usr\/share\/memcached\/scripts\/memcached-tool localhost:11211 dump\r\nDumping memcache contents\r\n  Number of buckets: 1\r\n  Number of items  : 1\r\nDumping bucket 1 - 1 total items\r\nadd key 0 1447949842 5\r\nvalue\r\n\r\nroot@hostname:\/home\/shimizu# \/usr\/share\/memcached\/scripts\/memcached-tool localhost:11211 dump &gt; memcached.data\r\nDumping memcache contents\r\n  Number of buckets: 1\r\n  Number of items  : 1\r\nDumping bucket 1 - 1 total items\r\n\r\nroot@hostname:\/home\/shimizu# cat memcached.data\r\nadd key 0 1447949842 5\r\nvalue\r\n\r\n<\/pre>\n<h1>memcached-tool\u3067\u30ea\u30b9\u30c8\u30a2<\/h1>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nroot@hostname:\/home\/shimizu# \/etc\/init.d\/memcached restart\r\n&#x5B; ok ] Restarting memcached (via systemctl): memcached.service.\r\n\r\nroot@hostname:\/home\/shimizu# cat memcached.data | nc localhost 11211\r\nSTORED\r\n^C\r\nroot@hostname:\/home\/shimizu# telnet localhost 11211\r\nTrying ::1...\r\nTrying 127.0.0.1...\r\nConnected to localhost.\r\nEscape character is '^]'.\r\nget key\r\nVALUE key 0 5\r\nvalue\r\nEND\r\n<\/pre>\n<p>\u6709\u52b9\u671f\u9650\u304c0\u306e\u30c7\u30fc\u30bf\u304c\u3042\u308b\u3068\u304a\u304b\u3057\u304f\u306a\u308b\u304b\u3082<br \/>\n<a href=\"http:\/\/qiita.com\/deep_blue_ao\/items\/df54c2fccbe60881bba3\">memcached-tool\u3092\u4f7f\u3063\u3066memcached\u306e\u30c7\u30fc\u30bf\u3092\u30a8\u30af\u30b9\u30dd\u30fc\u30c8\u3059\u308b<\/a><\/p>\n<h1>\u53c2\u8003URL<\/h1>\n<p><a href=\"http:\/\/dqn.sakusakutto.jp\/2011\/11\/memcached-tool.html\">memcached-tool\u306e\u53d6\u5f97\u65b9\u6cd5\u3068\u4f7f\u3044\u65b9<\/a><br \/>\n<a href=\"http:\/\/d.hatena.ne.jp\/moroto1122\/20131119\/1384857533\">memcached\u306e\u30c7\u30fc\u30bf\u3092\u79fb\u884c\u3059\u308b<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>memcached\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb root@hostname:\/home\/shimizu# aptitude install memcached \u4ee5\u4e0b\u306e\u65b0\u898f\u30d1\u30c3\u30b1\u30fc\u30b8\u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u307e\u3059: libevent-2.0-5{ [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[28],"tags":[],"_links":{"self":[{"href":"https:\/\/tech.akat.info\/index.php?rest_route=\/wp\/v2\/posts\/2357"}],"collection":[{"href":"https:\/\/tech.akat.info\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tech.akat.info\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tech.akat.info\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tech.akat.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2357"}],"version-history":[{"count":1,"href":"https:\/\/tech.akat.info\/index.php?rest_route=\/wp\/v2\/posts\/2357\/revisions"}],"predecessor-version":[{"id":2358,"href":"https:\/\/tech.akat.info\/index.php?rest_route=\/wp\/v2\/posts\/2357\/revisions\/2358"}],"wp:attachment":[{"href":"https:\/\/tech.akat.info\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2357"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tech.akat.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2357"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tech.akat.info\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2357"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}