如何安装Windows版Memcache
2017-02-22 07:19
316 查看
用nc命令操作memcached
1)存储数据:printf “set key 0 10 6\r\nresult\r\n” |nc 192.168.2.34 11211
2)获取数据:printf “get key\r\n” |nc 192.168.2.34 11211
3)删除数据:printf “delete key\r\n” |nc 192.168.2.34 11211
4)查看状态:printf “stats\r\n” |nc 192.168.2.34 11211
5)模拟top命令查看状态:watch “echo stats” |nc 192.168.2.34 11211
6)清空缓存:printf “flush_all\r\n” |nc 192.168.2.34 11211 (小心操作,清空了缓存就没了)
memcached的基本命令(安装、卸载、启动、配置相关):
-p 监听的端口
-l 连接的IP地址, 默认是本机
-d start 启动memcached服务
-d restart 重起memcached服务
-d stop|shutdown
关闭正在运行的memcached服务
-d install 安装memcached服务
-d uninstall 卸载memcached服务
-u 以的身份运行 (仅在以root运行的时候有效)
-m 最大内存使用,单位MB。默认64MB ,最大好像2G
-M 内存耗尽时返回错误,而不是删除项
-c 最大同时连接数,默认是1024
-f 块大小增长因子,默认是1.25
-n 最小分配空间,key+value+flags默认是48
-h 显示帮助
memcached的基本命令(当memcached 启动后用于对memcached管理的数据和本身运行状态相关的命令):
1)存储数据:printf “set key 0 10 6\r\nresult\r\n” |nc 192.168.2.34 11211
2)获取数据:printf “get key\r\n” |nc 192.168.2.34 11211
3)删除数据:printf “delete key\r\n” |nc 192.168.2.34 11211
4)查看状态:printf “stats\r\n” |nc 192.168.2.34 11211
5)模拟top命令查看状态:watch “echo stats” |nc 192.168.2.34 11211
6)清空缓存:printf “flush_all\r\n” |nc 192.168.2.34 11211 (小心操作,清空了缓存就没了)
memcached的基本命令(安装、卸载、启动、配置相关):
-p 监听的端口
-l 连接的IP地址, 默认是本机
-d start 启动memcached服务
-d restart 重起memcached服务
-d stop|shutdown
关闭正在运行的memcached服务
-d install 安装memcached服务
-d uninstall 卸载memcached服务
-u 以的身份运行 (仅在以root运行的时候有效)
-m 最大内存使用,单位MB。默认64MB ,最大好像2G
-M 内存耗尽时返回错误,而不是删除项
-c 最大同时连接数,默认是1024
-f 块大小增长因子,默认是1.25
-n 最小分配空间,key+value+flags默认是48
-h 显示帮助
memcached的基本命令(当memcached 启动后用于对memcached管理的数据和本身运行状态相关的命令):
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 |
相关文章推荐
- 如何安装Windows版Memcache
- 如何安装Windows版Memcache
- 如何将 Windows 2000 安装移到不同的硬件
- 如何在多台电脑上安装WINDOWS
- 如何配置 windows 安装盘需要拷贝的文件
- 如何加快Windows的安装过程
- 如何在windows 2003下安装卡巴斯机6.0
- 安装Windows后如何重新加载GRUB(How to reload missing GRUB after installing windows OS)
- 如何将 Windows 2000 安装移到不同的硬件
- 重新安装Windows后Grub如何恢复
- 如何在Free版的Windows上安装Checked版的ACPI.sys
- Windows中如何正确认识和安装驱动程序
- 如何将 Windows 2000 安装移到不同的硬件
- 如何将软件更新集成到 Windows 安装源文件中
- Windows下如何安装Linux
- 如何在windows上安装bugzilla
- 如何在Windows 2003服务器上部署远程安装程序
- How to 重装 Windows后Grub失效,如何重新安装Grub
- 在windows中如何安装Nutch
- 如何安装并使用Windows Symbol File