博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
redis常用命令
阅读量:6175 次
发布时间:2019-06-21

本文共 2946 字,大约阅读时间需要 9 分钟。

1、redis-benchmark

redis基准信息,redis服务器性能检测
redis-benchmark -h localhost -p 6379 -c 100 -n 100000
100个并发连接,100000个请求,检测host为localhost 端口为6379的redis服务器性能

[root@Architect redis-1.2.6]# redis-benchmark -h localhost -p 6379 -c 100 -n 100000====== PING ======  10001 requests completed in 0.41 seconds  50 parallel clients  3 bytes payload  keep alive: 10.01% <= 0 milliseconds23.09% <= 1 milliseconds85.82% <= 2 milliseconds95.60% <= 3 milliseconds97.20% <= 4 milliseconds97.96% <= 5 milliseconds98.83% <= 6 milliseconds99.41% <= 7 milliseconds99.70% <= 8 milliseconds99.99% <= 9 milliseconds100.00% <= 12 milliseconds24274.27 requests per second

2、redis-cli
redis-cli -h localhost -p 6380 monitor
Dump all the received requests in real time;
监控host为localhost,端口为6380,redis的连接及读写操作

[root@Architect redis-1.2.6]# redis-cli -h localhost -p 6380 monitor+OK+1289800615.808225 "monitor"+1289800615.839079 "GET" "name"+1289800615.853694 "PING"+1289800615.853783 "PING"+1289800615.854646 "PING"+1289800615.854974 "PING"+1289800615.857693 "PING"+1289800615.866862 "PING"+1289800615.871944 "PING"

redis-cli -h localhost -p 6380 info
Provide information and statistics about the server ;
提供host为localhost,端口为6380,redis服务的统计信息

[root@Architect redis-1.2.6]# redis-cli -h localhost -p 6380 inforedis_version:2.0.4redis_git_sha1:00000000redis_git_dirty:0arch_bits:32multiplexing_api:epollprocess_id:21990uptime_in_seconds:490580uptime_in_days:5connected_clients:103connected_slaves:0blocked_clients:0used_memory:4453240used_memory_human:4.25Mchanges_since_last_save:200bgsave_in_progress:0last_save_time:1290394640bgrewriteaof_in_progress:0total_connections_received:809total_commands_processed:44094018expired_keys:0hash_max_zipmap_entries:64hash_max_zipmap_value:512pubsub_channels:0pubsub_patterns:0vm_enabled:0role:slavemaster_host:localhostmaster_port:6379master_link_status:upmaster_last_io_seconds_ago:18db0:keys=1319,expires=0

3、redis-stat
redis-stat host localhost port 6380 overview
Print general information about a Redis instance;
实时打印出host为localhost,端口为6380,redis实例的总体信息

[root@Architect redis-1.2.6]# redis-stat port 6380 overview ------- data ------ ------------ load ----------------------------- - childs - keys      used-mem  clients   requests            connections 1319      5.37M     103       44108021 (+44108021) 810                1319      5.38M     103       44108124 (+103)     810                1319      5.38M     103       44108225 (+101)     810                1319      5.39M     103       44108326 (+101)     810                1319      5.40M     103       44108427 (+101)     810                1319      5.41M     103       44108528 (+101)     810

redis-stat host localhost port 6380 overview
Measure Redis server latency;
输出host为localhost,端口为6380,redis服务中每个请求的响应时长

[root@Architect redis-1.2.6]# redis-stat port 6380 latency1: 0.16 ms2: 0.11 ms3: 0.15 ms4: 0.11 ms5: 0.18 ms6: 0.14 ms

 

转载于:https://my.oschina.net/vdroid/blog/308388

你可能感兴趣的文章
阿里巴巴发布AliOS品牌 重投汽车及IoT领域
查看>>
OPENCV图像处理(二):模糊
查看>>
glassfish4系统启动脚本
查看>>
VMware 虚拟化编程(13) — VMware 虚拟机的备份方案设计
查看>>
独家 | 一文读懂推荐系统知识体系-下(评估、实战、学习资料)
查看>>
UIEvent&amp;nbsp;UIResponder&amp;nbsp;UI_04
查看>>
从非GP到GP
查看>>
云计算助力CDN加速
查看>>
iphone开发之多线程NSThread和NSInvocationOperation
查看>>
MFMailComposeViewController 发邮件
查看>>
velocity 模板解析类
查看>>
HTTP以及HTTPS协议
查看>>
Browser:浏览器版本判断类
查看>>
MyEclipse Servers视窗出现“Could not create the view: An unexpected exception was thrown”错误解决办法...
查看>>
伪类和伪元素
查看>>
jquery
查看>>
Day 3:模块结构和布局
查看>>
PWP+Nginx 集成环境下载
查看>>
【整理】RabbitMQ publish方法中的immediate和mandatory属性
查看>>
JAVA CAS原理深度分析
查看>>