memcache运维整理
memcache运维总结
第一部分:memcache安装
1、安装libevent
2、安装memcache
3、安装php的memcache扩展
4、测试
第二部分:memcache客户端操作
1、重要操作(来源: http://blog.163.com/xiao66_fei/blog/static/1099087642012911114848150/)
|
Command |
Description |
Example |
|
get |
Reads a value |
get mykey |
|
set |
Set a key unconditionally |
set mykey 0 60 5 |
|
add |
Add a new key |
add newkey 0 60 5 |
|
replace |
Overwrite existing key |
replace key 0 60 5 |
|
append |
Append data to existing key |
append key 0 60 15 |
|
prepend |
Prepend data to existing key |
prepend key 0 60 15 |
|
incr |
Increments numerical key value by given number |
incr mykey 2 |
|
decr |
Decrements numerical key value by given number |
decr mykey 5 |
|
delete |
Deletes an existing key |
delete mykey |
|
flush_all |
Invalidate specific items immediately |
flush_all |
|
Invalidate all items in n seconds |
flush_all 900 |
|
|
stats |
Prints general statistics |
stats |
|
Prints memory statistics |
stats slabs |
|
|
Prints memory statistics |
stats malloc |
|
|
Print higher level allocation statistics |
stats items |
|
|
stats detail |
||
|
stats sizes |
||
|
Resets statistics |
stats reset |
|
|
version |
Prints server version. |
version |
|
verbosity |
Increases log level |
verbosity |
|
quit |
Terminate telnet session |
quit |
2、操作实例
[root@localhost yebin]# telnet xxx.xxx.xxx.xxx 40xxx
Trying xxx.xxx.xxx.xxx...
Connected to xxx.xxx.xxx.xxx.
Escape character is '^]'.
set key
helloworld
STORED
get key
VALUE key
helloworld
END
flush_all
OK
set name
yebin
STORED
get name
VALUE name
yebin
END
stats
STAT pid
STAT uptime
STAT time
STAT version 1.4.
STAT libevent 2.0.-stable
STAT pointer_size
STAT rusage_user 1.381789
STAT rusage_system 1.545765
STAT curr_connections
STAT total_connections
STAT connection_structures
STAT reserved_fds
STAT cmd_get
STAT cmd_set
STAT cmd_flush
STAT cmd_touch
STAT get_hits
STAT get_misses
STAT delete_misses
STAT delete_hits
STAT incr_misses
STAT incr_hits
STAT decr_misses
STAT decr_hits
STAT cas_misses
STAT cas_hits
STAT cas_badval
STAT touch_hits
STAT touch_misses
STAT auth_cmds
STAT auth_errors
STAT bytes_read
STAT bytes_written
STAT limit_maxbytes
STAT accepting_conns
STAT listen_disabled_num
STAT threads
STAT conn_yields
STAT hash_power_level
STAT hash_bytes
STAT hash_is_expanding
STAT bytes
STAT curr_items
STAT total_items
STAT expired_unfetched
STAT evicted_unfetched
STAT evictions
STAT reclaimed
END
memcache运维整理的更多相关文章
- JAVA和Tomcat运维整理
安装JAVA和Tomcatapache-tomcat-8.5.37.tar.gz jdk-8u191-linux-x64.rpm [root@localhost ~]# ll /usr/java/t ...
- 【福吧资源网整理】老男孩-python运维6期 不加密
老男孩-python运维6期 不加密,连夜整理出来分享给大家老男孩的python教程确实不错. 教程目录: 下载地址:http://www.fu83.cn/thread-204-1-1.html
- Openstack运维指南文档整理
非常全面的运维指南整理http://zjzone.cc/index.php/2017/07/31/openstack-yun-wei-wen-dang-zheng-li/
- linux系列之常用运维命令整理笔录
目录 本博客记录工作中需要的linux运维命令,大学时候开始接触linux,会一些基本操作,可是都没有整理起来,加上是做开发,不做运维,有些命令忘记了,所以现在整理成博客,当然vi,文件操作等就不介绍 ...
- 运维开发笔记整理-Django模型语法
运维开发笔记整理-Django模型语法 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 一.模型基本概念 1>.什么是模型 模型是你的数据唯一的,权威的信息源.它包含你所存储数 ...
- 运维开发笔记整理-django日志配置
运维开发笔记整理-django日志配置 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 一.Django日志 Django使用python内建的logging模块打印日志,Pytho ...
- 运维开发笔记整理-基于类的视图(CBV)
运维开发笔记整理-基于类的视图(CBV) 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 一.FBV与CBV 1>.什么是FBV FBC(function base views ...
- 运维开发笔记整理-URL配置
运维开发笔记整理-URL配置 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 一.URL路由 对于高质量的Web应用来说,使用简洁,优雅的URL的路由是一个非常值得重视的细节.Dja ...
- 运维开发笔记整理-创建django用户
运维开发笔记整理-创建django用户 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 一.创建普通用户 C:\Users\yinzhengjie\softwares\Pycharm ...
随机推荐
- 转:对于linux下system()函数的深度理解(整理)
这几天调程序(嵌入式linux),发现程序有时就莫名其妙的死掉,每次都定位在程序中不同的system()函数,直接在shell下输入system()函数中调用的命令也都一切正常.就没理这个bug,以为 ...
- 通过button提交表单
通过 input button 而不是input submit提交. <!DOCTYPE html> <html lang="en"> <head&g ...
- swipejs
http://swipejs.com/ http://www.scoop.it/t/javascript-for-mobile http://www.open-open.com/news/view/c ...
- c#—— Task.FromResult 的使用
Task.FromResult用来创建一个带返回值的.已完成的Task. 场景一:以同步的方式实现一个异步接口方法 比如有一个接口包含异步方法. interface IMyInterface { Ta ...
- Visual Studio新建的源文件的默认编码
原来VS新建的源文件默认的编码是根据系统locale选择的.我的是国标2312.我草.可坑死我了.一直不知道. 当时主要是需要用doxygen生成html文档,它默认的输入文件的格式是UTF-8,是不 ...
- 黑马程序员_Java_collections and Arrays(工具类)
collections collections工具类方法 1,static <T extends Comparable<? super T>> void sort(List&l ...
- HDOJ 1302(UVa 573) The Snail(蜗牛爬井)
Problem Description A snail is at the bottom of a 6-foot well and wants to climb to the top. The sna ...
- [Operationg System Labs] 我对 Linux0.00 中 boot.s的理解和注释
(如有错误请立即指正,么么哒!) ! boot.s!! It then loads the system at 0x10000, using BIOS interrupts. Thereafte ...
- USACO6.4-Wisconsin Squares:搜索
Wisconsin Squares It's spring in Wisconsin and time to move the yearling calves to the yearling past ...
- socket实例2
第二个实例创建一个java工程,基于tomcat服务器,程序运行时会启动客户端,实现了一个客户端向其他的客户端发送即时信息的功能 MainWindow.java package com.jikexue ...