国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 數(shù)據(jù)庫 > Redis > 正文

redis常用命令小結(jié)

2020-03-17 12:44:50
字體:
供稿:網(wǎng)友

這篇文章主要介紹了redis的一些常用命令,需要的朋友可以參考下

1、redis-benchmark

redis基準信息,redis服務(wù)器性能檢測

redis-benchmark -h localhost -p 6379 -c 100 -n 100000

100個并發(fā)連接,100000個請求,檢測host為localhost 端口為6379的redis服務(wù)器性能

 

 
  1. [root@Architect redis-1.2.6]# redis-benchmark -h localhost -p 6379 -c 100 -n 100000 
  2. ====== PING ====== 
  3. 10001 requests completed in 0.41 seconds 
  4. 50 parallel clients 
  5. 3 bytes payload 
  6. keep alive: 1 
  7.  
  8. 0.01% <= 0 milliseconds 
  9. 23.09% <= 1 milliseconds 
  10. 85.82% <= 2 milliseconds 
  11. 95.60% <= 3 milliseconds 
  12. 97.20% <= 4 milliseconds 
  13. 97.96% <= 5 milliseconds 
  14. 98.83% <= 6 milliseconds 
  15. 99.41% <= 7 milliseconds 
  16. 99.70% <= 8 milliseconds 
  17. 99.99% <= 9 milliseconds 
  18. 100.00% <= 12 milliseconds 
  19. 24274.27 requests per second 

2、redis-cli

redis-cli -h localhost -p 6380 monitor

Dump all the received requests in real time;

監(jiān)控host為localhost,端口為6380,redis的連接及讀寫操作

 

 
  1. [root@Architect redis-1.2.6]# redis-cli -h localhost -p 6380 monitor 
  2. +OK 
  3. +1289800615.808225 "monitor" 
  4. +1289800615.839079 "GET" "name" 
  5. +1289800615.853694 "PING" 
  6. +1289800615.853783 "PING" 
  7. +1289800615.854646 "PING" 
  8. +1289800615.854974 "PING" 
  9. +1289800615.857693 "PING" 
  10. +1289800615.866862 "PING" 
  11. +1289800615.871944 "PING" 

redis-cli -h localhost -p 6380 info

Provide information and statistics about the server ;

提供host為localhost,端口為6380,redis服務(wù)的統(tǒng)計信息

 

 
  1. [root@Architect redis-1.2.6]# redis-cli -h localhost -p 6380 info 
  2. redis_version:2.0.4 
  3. redis_git_sha1:00000000 
  4. redis_git_dirty:0 
  5. arch_bits:32 
  6. multiplexing_api:epoll 
  7. process_id:21990 
  8. uptime_in_seconds:490580 
  9. uptime_in_days:5 
  10. connected_clients:103 
  11. connected_slaves:0 
  12. blocked_clients:0 
  13. used_memory:4453240 
  14. used_memory_human:4.25M 
  15. changes_since_last_save:200 
  16. bgsave_in_progress:0 
  17. last_save_time:1290394640 
  18. bgrewriteaof_in_progress:0 
  19. total_connections_received:809 
  20. total_commands_processed:44094018 
  21. expired_keys:0 
  22. hash_max_zipmap_entries:64 
  23. hash_max_zipmap_value:512 
  24. pubsub_channels:0 
  25. pubsub_patterns:0 
  26. vm_enabled:0 
  27. role:slave 
  28. master_host:localhost 
  29. master_port:6379 
  30. master_link_status:up 
  31. master_last_io_seconds_ago:18 
  32. db0: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實例的總體信息

 

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

redis-stat host localhost port 6380 overview

Measure Redis server latency;

輸出host為localhost,端口為6380,redis服務(wù)中每個請求的響應(yīng)時長

 

 
  1. [root@Architect redis-1.2.6]# redis-stat port 6380 latency 
  2. 1: 0.16 ms 
  3. 2: 0.11 ms 
  4. 3: 0.15 ms 
  5. 4: 0.11 ms 
  6. 5: 0.18 ms 
  7. 6: 0.14 ms  

發(fā)表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發(fā)表
主站蜘蛛池模板: 钟山县| 同德县| 马鞍山市| 乐清市| 墨江| 福泉市| 法库县| 织金县| 象山县| 卢湾区| 太康县| 平邑县| 龙川县| 利辛县| 江山市| 循化| 栾川县| 莱西市| 三门县| 稻城县| 菏泽市| 九龙城区| 黔江区| 阜宁县| 措勤县| 乡宁县| 应城市| 开封县| 临朐县| 繁昌县| 界首市| 南靖县| 青浦区| 苏尼特右旗| 巩义市| 巨鹿县| 常州市| 治县。| 贵德县| 屏山县| 闽清县|