博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
memcached查看和清理
阅读量:7173 次
发布时间:2019-06-29

本文共 1349 字,大约阅读时间需要 4 分钟。

1.一种

  telnet localhost 200001 #登陆

  stats   #查看状态

  flush_all   #清理

  quit   #退出

  2.又学到一个:

  echo 'flush_all' | nc localhost 200001

  3.

  1、数据存储(假设key为test,value为12345)

  printf "set test 0 0 5\r\n12345\r\n" | nc 127.0.0.1 200001

  STORED

  2、数据取回(假设key为test)

  printf "get test\r\n" | nc 127.0.0.1 200001

  VALUE test 0 5

  12345

  END

  3、数值增加1(假设key为test,并且value为正整数)

  printf "incr test 1\r\n" | nc 127.0.0.1 200001

  12346

  4、数值减少3(假设key为test,并且value为正整数)

  printf "decr test 3\r\n" | nc 127.0.0.1 200001

  12343

  5、数据删除(假设key为test)

  printf "delete test\r\n" | nc 127.0.0.1 11211

  DELETED

  6、查看Memcached状态

  printf "stats\r\n" | nc 127.0.0.1 200001

  STAT pid 3025

  STAT uptime 4120500

  STAT time 1228021767

  STAT version 1.2.6

  STAT pointer_size 32

  STAT rusage_user 433.463103

  STAT rusage_system 1224.515845

  STAT curr_items 1132460

  STAT total_items 8980260

  STAT bytes 1895325386

  STAT curr_connections 252

  STAT total_connections 547850

  STAT connection_structures 1189

  STAT cmd_get 13619685

  STAT cmd_set 8980260

  STAT get_hits 6851607

  STAT get_misses 6768078

  STAT evictions 0

  STAT bytes_read 160396238246

  STAT bytes_written 260080686529

  STAT limit_maxbytes 2147483648

  STAT threads 1

  END

  7、模拟top命令,查看Memcached状态:

  printf "stats\r\n" | nc 127.0.0.1 200001

  或者

  watch "echo stats | nc 127.0.0.1 200001"

转载地址:http://bhfzm.baihongyu.com/

你可能感兴趣的文章
USB抓包工具--Bus Hound的使用方法详解
查看>>
location of android sdk has not been setup in the preference
查看>>
Centos7 二进制安装mysql5.7
查看>>
Centos7之Nginx的两种工作模式
查看>>
Java之品优购课程讲义_day18(3)
查看>>
rpm,yum,权限
查看>>
更新yum到 163
查看>>
Office 2019 & Office 2016 下载地址
查看>>
tomcat应用转到weblogic上时的问题
查看>>
国外程序员是如何准备面试的
查看>>
Zookeeper监控之——node-zk-browser
查看>>
我的友情链接
查看>>
10个最酷的linux单行命令
查看>>
myeclipse 10 在mac retina 屏幕下显示字体模糊解决方法
查看>>
创建自定义的指令
查看>>
javascript对象中判断属性
查看>>
git删除分支与合并分支
查看>>
Python元组
查看>>
HD TUNE以及所有其他硬盘检测工具都不能使用的情况
查看>>
Linux内存分析
查看>>