Memcached常用命令及使用说明——netcat
2024-10-21 12:51:51
数据存储(假设key为test,value为12345)
- printf "set test 0 0 5\r\n12345\r\n" | nc 127.0.0.1 12000
STORED
数据取回(假设key为test)
- printf "get test\r\n" | nc 127.0.0.1 12000
VALUE test 0 5
12345
END
数值增加1(假设key为test,并且value为正整数)
- printf "incr test 1\r\n" | nc 127.0.0.1 12000
12346
数值减少3(假设key为test,并且value为正整数)
- printf "decr test 3\r\n" | nc 127.0.0.1 12000
12343
数据删除(假设key为test)
- printf "delete test\r\n" | nc 127.0.0.1 12000
DELETED
查看Memcached状态
- printf "stats\r\n" | nc 127.0.0.1 12000
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
模拟top命令,查看Memcached状态:
- watch "printf 'stats\r\n' | nc 127.0.0.1 12000"
或者
- watch "echo stats | nc 127.0.0.1 12000"
最新文章
- bootstrap学习笔记--bootstrap安装环境
- org.hibernate.AssertionFailure:collection[......] was not processed by flush()
- mac下有道词典用不了
- Oracle 字符串函数
- hdu4686 Arc of Dream ——构造矩阵+快速幂
- java实现合并两个已经排序的列表
- 《HelloGitHub》第 21 期
- WDA基础十六:ALV的颜色
- 1-蓝桥杯套路-java
- rest-framework之认证组件
- 【C#复习总结】细说表达式树
- 搭建Nuget服务器
- python作业学员管理系统(第十二周)
- Carmichael Numbers (Uva No.10006) -- 快速幂运算_埃氏筛法_打表
- Spring Mvc Web 配置拦截规则与访问静态资源 (三)
- IOS7 新特性
- c#多线程介绍1
- Linux/Unix下Shell快捷键操作集合
- BZOJ2802 [Poi2012]Warehouse Store 【贪心】
- (一)问候 Log4j 你好
热门文章
- 一致性Hash算法说明
- Java 8新的时间日期库的20个使用示例
- Java并发编程的艺术(十一)——线程池(2)
- 实用ExtJS教程100例-001:开天辟地的Hello World
- [转]PHP资源列表
- SpringBoot整合Quartz定时任务 系统job Spring Boot教程 调度任务
- 指定文件兼容性模式 <; meta http-equiv = ";X-UA-Compatible"; content = ";IE=edge,chrome=1"; />;的意义
- linux和windows时间同步问题(UTC&;localtime)
- [leetcode]Word Ladder II @ Python
- Neo4j 2.0 生产环境集群搭建