Chinaunix首页 | 论坛 | 博客
  • 博客访问: 79213
  • 博文数量: 52
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: -20
  • 用 户 组: 普通用户
  • 注册时间: 2018-06-04 17:51
文章分类

全部博文(52)

文章存档

2013年(6)

2012年(3)

2011年(4)

2010年(18)

2009年(21)

我的朋友

分类: LINUX

2010-07-01 15:17:37

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 200001


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

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

    VALUE test 0 5
     12345
     END

    3、数值增加1(假设key为test,并且value为正整数)
  
     printf "incr test 1\r\n" | nc 200001


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

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

    12343
    5、数据删除(假设key为test)
       printf "delete test\r\n" | nc 11211


    DELETED
    6、查看Memcached状态
 

     printf "stats\r\n" | nc 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 200001
  或者
  
      watch "echo stats | nc 200001"
阅读(1055) | 评论(1) | 转发(0) |
给主人留下些什么吧!~~

chinaunix网友2010-07-02 11:29:14

http://www.soho-work.info/?2712.htm