查看遠程Redis伺服器的版本,查看redis伺服器
查看遠程Redis伺服器的版本
如何查看遠程Redis伺服器的版本
作者:chszs,轉載需註明。部落客頁:http://blog.csdn.net/chszs
如果無遠程Redis伺服器的SSH存取權限,又想知道Redis伺服器是哪個版本,該怎麼辦?
很簡單,在本地安裝一個Redis,利用Redis用戶端命令查看:
# ./src/redis-cli -h 192.168.1.3 info | grep 'redis_version'redis_version:2.8.8
還可以看完整的資訊:
# ./src/redis-cli -h 192.168.1.3 info# Serverredis_version:2.8.8redis_git_sha1:00000000redis_git_dirty:0redis_build_id:43fea591cc6ce090redis_mode:standaloneos:Linux 2.6.18-308.el5 x86_64arch_bits:64multiplexing_api:epollgcc_version:4.1.2process_id:8719run_id:f69135bba0fd50a55cfeaca56788e963d1a33a38tcp_port:6379uptime_in_seconds:14582183uptime_in_days:168hz:10lru_clock:7432791config_file:/opt/redis/conf/redis.conf# Clientsconnected_clients:198client_longest_output_list:0client_biggest_input_buf:0blocked_clients:0# Memoryused_memory:305139776used_memory_human:291.00Mused_memory_rss:335597568used_memory_peak:345944184used_memory_peak_human:329.92Mused_memory_lua:29696mem_fragmentation_ratio:1.10mem_allocator:jemalloc-3.2.0# Persistenceloading:0rdb_changes_since_last_save:36276rdb_bgsave_in_progress:0rdb_last_save_time:1433496111rdb_last_bgsave_status:okrdb_last_bgsave_time_sec:4rdb_current_bgsave_time_sec:-1aof_enabled:0aof_rewrite_in_progress:0aof_rewrite_scheduled:0aof_last_rewrite_time_sec:-1aof_current_rewrite_time_sec:-1aof_last_bgrewrite_status:okaof_last_write_status:ok# Statstotal_connections_received:9787total_commands_processed:45631162136instantaneous_ops_per_sec:5336rejected_connections:0sync_full:1sync_partial_ok:2sync_partial_err:0expired_keys:0evicted_keys:0keyspace_hits:34233696840keyspace_misses:64496pubsub_channels:0pubsub_patterns:0latest_fork_usec:24591# Replicationrole:masterconnected_slaves:1slave0:ip=192.168.1.5,port=6379,state=online,offset=862467827791,lag=1master_repl_offset:862467915661repl_backlog_active:1repl_backlog_size:1048576repl_backlog_first_byte_offset:862466867086repl_backlog_histlen:1048576# CPUused_cpu_sys:700504.88used_cpu_user:433667.81used_cpu_sys_children:26926.16used_cpu_user_children:254138.31# Keyspacedb0:keys=67,expires=0,avg_ttl=0db15:keys=17476,expires=0,avg_ttl=0