查看远程Redis服务器的版本

查看远程Redis服务器的版本

如何查看远程redis服务器的版本

作者:chszs,转载需注明。博客主页:http://blog.csdn.net/chszs

如果无远程Redis服务器的SSH访问权限,又想知道Redis服务器是哪个版本,该怎么办?

很简单,在本地安装一个Redis,利用Redis客户端命令查看:

[python]  view plain  copy
 print ?
  1. # ./src/redis-cli -h 192.168.1.3 info | grep 'redis_version'  
  2. redis_version:2.8.8  

还可以看完整的信息:

[python]  view plain  copy
 print ?
  1. # ./src/redis-cli -h 192.168.1.3 info  
  2. # Server  
  3. redis_version:2.8.8  
  4. redis_git_sha1:00000000  
  5. redis_git_dirty:0  
  6. redis_build_id:43fea591cc6ce090  
  7. redis_mode:standalone  
  8. os:Linux 2.6.18-308.el5 x86_64  
  9. arch_bits:64  
  10. multiplexing_api:epoll  
  11. gcc_version:4.1.2  
  12. process_id:8719  
  13. run_id:f69135bba0fd50a55cfeaca56788e963d1a33a38  
  14. tcp_port:6379  
  15. uptime_in_seconds:14582183  
  16. uptime_in_days:168  
  17. hz:10  
  18. lru_clock:7432791  
  19. config_file:/opt/redis/conf/redis.conf  
  20.   
  21. # Clients  
  22. connected_clients:198  
  23. client_longest_output_list:0  
  24. client_biggest_input_buf:0  
  25. blocked_clients:0  
  26.   
  27. # Memory  
  28. used_memory:305139776  
  29. used_memory_human:291.00M  
  30. used_memory_rss:335597568  
  31. used_memory_peak:345944184  
  32. used_memory_peak_human:329.92M  
  33. used_memory_lua:29696  
  34. mem_fragmentation_ratio:1.10  
  35. mem_allocator:jemalloc-3.2.0  
  36.   
  37. # Persistence  
  38. loading:0  
  39. rdb_changes_since_last_save:36276  
  40. rdb_bgsave_in_progress:0  
  41. rdb_last_save_time:1433496111  
  42. rdb_last_bgsave_status:ok  
  43. rdb_last_bgsave_time_sec:4  
  44. rdb_current_bgsave_time_sec:-1  
  45. aof_enabled:0  
  46. aof_rewrite_in_progress:0  
  47. aof_rewrite_scheduled:0  
  48. aof_last_rewrite_time_sec:-1  
  49. aof_current_rewrite_time_sec:-1  
  50. aof_last_bgrewrite_status:ok  
  51. aof_last_write_status:ok  
  52.   
  53. # Stats  
  54. total_connections_received:9787  
  55. total_commands_processed:45631162136  
  56. instantaneous_ops_per_sec:5336  
  57. rejected_connections:0  
  58. sync_full:1  
  59. sync_partial_ok:2  
  60. sync_partial_err:0  
  61. expired_keys:0  
  62. evicted_keys:0  
  63. keyspace_hits:34233696840  
  64. keyspace_misses:64496  
  65. pubsub_channels:0  
  66. pubsub_patterns:0  
  67. latest_fork_usec:24591  
  68.   
  69. # Replication  
  70. role:master  
  71. connected_slaves:1  
  72. slave0:ip=192.168.1.5,port=6379,state=online,offset=862467827791,lag=1  
  73. master_repl_offset:862467915661  
  74. repl_backlog_active:1  
  75. repl_backlog_size:1048576  
  76. repl_backlog_first_byte_offset:862466867086  
  77. repl_backlog_histlen:1048576  
  78.   
  79. # CPU  
  80. used_cpu_sys:700504.88  
  81. used_cpu_user:433667.81  
  82. used_cpu_sys_children:26926.16  
  83. used_cpu_user_children:254138.31  
  84.   
  85. # Keyspace  
  86. db0:keys=67,expires=0,avg_ttl=0  
  87. db15:keys=17476,expires=0,avg_ttl=0  
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值