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 ...
随机推荐
- Android 自定义View 画圆 画线
自定义一个DrawCircle继承View 实现构造方法: public DrawCircle(Context context) { super(context); this.mContext = c ...
- windows 2003 远程桌面 连接输入账号密码后,只能看见蓝色屏幕和鼠标
具体解决方案参考的 http://www.tomshardware.com/forum/171045-46-remote-desktop-connection-blank-desktop to s ...
- Android json操作之取得一个对象
1:服务端返回的json数据格式如下: {"id":"1001","name":"zhangsan","sco ...
- 不建议用wxWidgets,底层有过多的bug
不建议用wxWidgets, 搞了wxWidgets 3年,不是所说的那么容易跨平台,很多bug,不稳定, 莫名其妙的崩溃找源代码修改编译真是费时费力. 开发速度真没有使用本地sdk开发高, 很难定制 ...
- [LeetCode] 179. Largest Number 解题思路
Given a list of non negative integers, arrange them such that they form the largest number. For exam ...
- 红领:挺进高端 青岛财经日报-htmlmainVerName
红领:挺进高端 青岛财经日报-htmlmainVerName 红领:挺进高端
- Apache Ant在Windows下配置环境变量
Windows下ANT用到的环境变量主要有2个: ANT_HOME 和 PATH. 1..设置ANT_HOME指向ant的安装目录,如下: ANT_HOME = D:\soft\apache\apac ...
- [每日一题] OCP1z0-047 :2013-08-05 SELECT语句――列的表达式
按题意操作如下: hr@MYDB> SELECT first_name,salary,salary*12+salary*12*0.5 "ANNUAL SALARY + BONUS&qu ...
- 【Ruby on Rails 学习一】ubuntu14.04配置rvm与ruby
要安装ruby,首先要安装rvm,借助rvm安装ruby rvm 的全称是 Ruby Version Manager ,是一款由 Wayne E. Seguin 开发的一款命令行工具.rvm 能够让 ...
- 获取程序中无需释放的ViewController
AppDelegate.h @property (strong, nonatomic) UIViewController *viewController; 在需要用的地方 #define appDel ...