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 ...
随机推荐
- UI、ID、UE和GUI,这些都是什么
在网页和应用设计领域中,我们经常会听到人们用这些英文缩写描述设计工作,那么它们各自代表什么含义?具体的工作.方向和区别是什么呢? 下面让我们先来看看它们的英文全称和基本概念. UI(User Inte ...
- LDMFD和STMFD个人理解
ARM里面的堆栈是满递减(FULL DESCENDING)的.SP指向最后一个入栈的数据,SP的地址由高向低生长.对于LDM和STM指令来说,编号小的寄存器对应堆栈中的低地址. STMFD的寻址方式是 ...
- android使用apktool反编译出现Input file (d:\t) was not found or was not readable
Input file (d:\t) was not found or was not readable 出现这个错误是因为apktool压缩包下载错误,我是下成首页的那个压缩包了 正确下载地址:htt ...
- CH Round #54 - Streaming #5 (NOIP模拟赛Day1)
A.珠 题目:http://ch.ezoj.tk/contest/CH%20Round%20%2354%20-%20Streaming%20%235%20(NOIP模拟赛Day1)/珠 题解:sb题, ...
- java中一直说一个汉字使用两个字节,原来是不准确的
utf-8码的中文都是3字节的,而 gbk/gbk18030 是2字节的
- cf581C Developing Skills
Petya loves computer games. Finally a game that he's been waiting for so long came out! The main cha ...
- EF 5.0 帮助类 增删改查
原文地址:http://www.cnblogs.com/luomingui/p/3362813.html EF 5.0 帮助类 加入命名空间: using System; using System.D ...
- cpppp
- HDFS Federation与HDFS High Availability详解
HDFS Federation NameNode在内存中保存文件系统中每个文件和每个数据块的引用关系,这意味着对于一个拥有大量文件的超大集群来说,内存将成为限制系统横向扩展的瓶颈.在2.0发行版本系列 ...
- 小结OC中Retain cycle(循环引用)
retain cycle 的产生 说到retain cycle,首先要提一下Objective-C的内存管理机制. 作为C语言的超集,Objective-C延续了C语言中手动管理内存的方式,但是区别于 ...