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

  1. printf "set test 0 0 5\r\n12345\r\n" | nc 127.0.0.1 12000

STORED

数据取回(假设key为test)

  1. printf "get test\r\n" | nc 127.0.0.1 12000

VALUE test 0 5

12345

END

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

  1. printf "incr test 1\r\n" | nc 127.0.0.1 12000

12346

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

  1. printf "decr test 3\r\n" | nc 127.0.0.1 12000

12343

数据删除(假设key为test)

  1. printf "delete test\r\n" | nc 127.0.0.1 12000

DELETED

查看Memcached状态

  1. printf "stats\r\n" | nc 127.0.0.1 12000

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

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

  1. watch "printf 'stats\r\n' | nc 127.0.0.1 12000"

或者

  1. watch "echo stats | nc 127.0.0.1 12000"

最新文章

  1. bootstrap学习笔记--bootstrap安装环境
  2. org.hibernate.AssertionFailure:collection[......] was not processed by flush()
  3. mac下有道词典用不了
  4. Oracle 字符串函数
  5. hdu4686 Arc of Dream ——构造矩阵+快速幂
  6. java实现合并两个已经排序的列表
  7. 《HelloGitHub》第 21 期
  8. WDA基础十六:ALV的颜色
  9. 1-蓝桥杯套路-java
  10. rest-framework之认证组件
  11. 【C#复习总结】细说表达式树
  12. 搭建Nuget服务器
  13. python作业学员管理系统(第十二周)
  14. Carmichael Numbers (Uva No.10006) -- 快速幂运算_埃氏筛法_打表
  15. Spring Mvc Web 配置拦截规则与访问静态资源 (三)
  16. IOS7 新特性
  17. c#多线程介绍1
  18. Linux/Unix下Shell快捷键操作集合
  19. BZOJ2802 [Poi2012]Warehouse Store 【贪心】
  20. (一)问候 Log4j 你好

热门文章

  1. 一致性Hash算法说明
  2. Java 8新的时间日期库的20个使用示例
  3. Java并发编程的艺术(十一)——线程池(2)
  4. 实用ExtJS教程100例-001:开天辟地的Hello World
  5. [转]PHP资源列表
  6. SpringBoot整合Quartz定时任务 系统job Spring Boot教程 调度任务
  7. 指定文件兼容性模式 < meta http-equiv = "X-UA-Compatible" content = "IE=edge,chrome=1" />的意义
  8. linux和windows时间同步问题(UTC&localtime)
  9. [leetcode]Word Ladder II @ Python
  10. Neo4j 2.0 生产环境集群搭建