4.客户端连接redis集群:

4.客户端连接集群:

[java]  view plain  copy

  1.  redis-cli -c -h 127.0.0.1 -p 7001  
  1. 127.0.0.1:7001> info  
  2. # Server  
  3. redis_version:4.0.1  
  4. redis_git_sha1:00000000  
  5. redis_git_dirty:0  
  6. redis_build_id:c2421362bb182556  
  7. redis_mode:cluster  
  8. os:Linux 4.8.0-36-generic x86_64  
  9. arch_bits:64  
  10. multiplexing_api:epoll  
  11. atomicvar_api:atomic-builtin  
  12. gcc_version:5.4.0  
  13. process_id:2281  
  14. run_id:52d913baa483a08bb2b9aab5d16722a4dad7682c  
  15. tcp_port:7001  
  16. uptime_in_seconds:105  
  17. uptime_in_days:0  
  18. hz:10  
  19. lru_clock:9441446  
  20. executable:/home/sa/Downloads/redis-4.0.1/src/redis-server  
  21. config_file:/home/sa/Downloads/redis-cluster/7001/redis.conf  
  22.   
  23. # Clients  
  24. connected_clients:1  
  25. client_longest_output_list:0  
  26. client_biggest_input_buf:0  
  27. blocked_clients:0  
  28.   
  29. # Memory  
  30. used_memory:2621712  
  31. used_memory_human:2.50M  
  32. used_memory_rss:13803520  
  33. used_memory_rss_human:13.16M  
  34. used_memory_peak:2622736  
  35. used_memory_peak_human:2.50M  
  36. used_memory_peak_perc:99.96%  
  37. used_memory_overhead:2552496  
  38. used_memory_startup:1437432  
  39. used_memory_dataset:69216  
  40. used_memory_dataset_perc:5.84%  
  41. total_system_memory:2077257728  
  42. total_system_memory_human:1.93G  
  43. used_memory_lua:37888  
  44. used_memory_lua_human:37.00K  
  45. maxmemory:0  
  46. maxmemory_human:0B  
  47. maxmemory_policy:noeviction  
  48. mem_fragmentation_ratio:5.26  
  49. mem_allocator:jemalloc-4.0.3  
  50. active_defrag_running:0  
  51. lazyfree_pending_objects:0  
  52.   
  53. # Persistence  
  54. loading:0  
  55. rdb_changes_since_last_save:0  
  56. rdb_bgsave_in_progress:0  
  57. rdb_last_save_time:1502613566  
  58. rdb_last_bgsave_status:ok  
  59. rdb_last_bgsave_time_sec:0  
  60. rdb_current_bgsave_time_sec:-1  
  61. rdb_last_cow_size:6537216  
  62. aof_enabled:1  
  63. aof_rewrite_in_progress:0  
  64. aof_rewrite_scheduled:0  
  65. aof_last_rewrite_time_sec:-1  
  66. aof_current_rewrite_time_sec:-1  
  67. aof_last_bgrewrite_status:ok  
  68. aof_last_write_status:ok  
  69. aof_last_cow_size:0  
  70. aof_current_size:0  
  71. aof_base_size:0  
  72. aof_pending_rewrite:0  
  73. aof_buffer_length:0  
  74. aof_rewrite_buffer_length:0  
  75. aof_pending_bio_fsync:0  
  76. aof_delayed_fsync:0  
  77.   
  78. # Stats  
  79. total_connections_received:3  
  80. total_commands_processed:113  
  81. instantaneous_ops_per_sec:1  
  82. total_net_input_bytes:3880  
  83. total_net_output_bytes:15076  
  84. instantaneous_input_kbps:0.04  
  85. instantaneous_output_kbps:0.00  
  86. rejected_connections:0  
  87. sync_full:1  
  88. sync_partial_ok:0  
  89. sync_partial_err:1  
  90. expired_keys:0  
  91. evicted_keys:0  
  92. keyspace_hits:0  
  93. keyspace_misses:0  
  94. pubsub_channels:0  
  95. pubsub_patterns:0  
  96. latest_fork_usec:1563  
  97. migrate_cached_sockets:0  
  98. slave_expires_tracked_keys:0  
  99. active_defrag_hits:0  
  100. active_defrag_misses:0  
  101. active_defrag_key_hits:0  
  102. active_defrag_key_misses:0  
  103.   
  104. # Replication  
  105. role:master  
  106. connected_slaves:1  
  107. slave0:ip=127.0.0.1,port=7004,state=online,offset=140,lag=0  
  108. master_replid:6159bfd6d6502db45adaafd137b094028e532e03  
  109. master_replid2:0000000000000000000000000000000000000000  
  110. master_repl_offset:140  
  111. second_repl_offset:-1  
  112. repl_backlog_active:1  
  113. repl_backlog_size:1048576  
  114. repl_backlog_first_byte_offset:1  
  115. repl_backlog_histlen:140  
  116.   
  117. # CPU  
  118. used_cpu_sys:0.21  
  119. used_cpu_user:0.12  
  120. used_cpu_sys_children:0.00  
  121. used_cpu_user_children:0.00  
  122.   
  123. # Cluster  
  124. cluster_enabled:1  
  125.   
  126. # Keyspace  
  127. 127.0.0.1:7001>   
  128. root@ubuntu:/home/sa/Downloads/redis-4.0.1/src#   

看样子是可以了,继续。

4.测试:

4.客户端连接redis集群:_第1张图片

4.客户端连接redis集群:_第2张图片

你可能感兴趣的:(Redis)