您好,登錄后才能下訂單哦!
客戶端使用redis-cli連接redis集群?相信很多沒有經驗的人對此束手無策,為此本文總結了問題出現的原因和解決方法,通過這篇文章希望你能解決這個問題。
具體內容如下:
redis-cli -c -h 127.0.0.1 -p 7001
127.0.0.1:7001> info
# Server
redis_version:4.0.1
redis_git_sha1:00000000
redis_git_dirty:0
redis_build_id:c2421362bb182556
redis_mode:cluster
os:Linux 4.8.0-36-generic x86_64
arch_bits:64
multiplexing_api:epoll
atomicvar_api:atomic-builtin
gcc_version:5.4.0
process_id:2281
run_id:52d913baa483a08bb2b9aab5d16722a4dad7682c
tcp_port:7001
uptime_in_seconds:105
uptime_in_days:0
hz:10
lru_clock:9441446
executable:/home/sa/Downloads/redis-4.0.1/src/redis-server
config_file:/home/sa/Downloads/redis-cluster/7001/redis.conf
# Clients
connected_clients:1
client_longest_output_list:0
client_biggest_input_buf:0
blocked_clients:0
# Memory
used_memory:2621712
used_memory_human:2.50M
used_memory_rss:13803520
used_memory_rss_human:13.16M
used_memory_peak:2622736
used_memory_peak_human:2.50M
used_memory_peak_perc:99.96%
used_memory_overhead:2552496
used_memory_startup:1437432
used_memory_dataset:69216
used_memory_dataset_perc:5.84%
total_system_memory:2077257728
total_system_memory_human:1.93G
used_memory_lua:37888
used_memory_lua_human:37.00K
maxmemory:0
maxmemory_human:0B
maxmemory_policy:noeviction
mem_fragmentation_ratio:5.26
mem_allocator:jemalloc-4.0.3
active_defrag_running:0
lazyfree_pending_objects:0
# Persistence
loading:0
rdb_changes_since_last_save:0
rdb_bgsave_in_progress:0
rdb_last_save_time:1502613566
rdb_last_bgsave_status:ok
rdb_last_bgsave_time_sec:0
rdb_current_bgsave_time_sec:-1
rdb_last_cow_size:6537216
aof_enabled:1
aof_rewrite_in_progress:0
aof_rewrite_scheduled:0
aof_last_rewrite_time_sec:-1
aof_current_rewrite_time_sec:-1
aof_last_bgrewrite_status:ok
aof_last_write_status:ok
aof_last_cow_size:0
aof_current_size:0
aof_base_size:0
aof_pending_rewrite:0
aof_buffer_length:0
aof_rewrite_buffer_length:0
aof_pending_bio_fsync:0
aof_delayed_fsync:0
# Stats
total_connections_received:3
total_commands_processed:113
instantaneous_ops_per_sec:1
total_net_input_bytes:3880
total_net_output_bytes:15076
instantaneous_input_kbps:0.04
instantaneous_output_kbps:0.00
rejected_connections:0
sync_full:1
sync_partial_ok:0
sync_partial_err:1
expired_keys:0
evicted_keys:0
keyspace_hits:0
keyspace_misses:0
pubsub_channels:0
pubsub_patterns:0
latest_fork_usec:1563
migrate_cached_sockets:0
slave_expires_tracked_keys:0
active_defrag_hits:0
active_defrag_misses:0
active_defrag_key_hits:0
active_defrag_key_misses:0
# Replication
role:master
connected_slaves:1
slave0:ip=127.0.0.1,port=7004,state=online,offset=140,lag=0
master_replid:6159bfd6d6502db45adaafd137b094028e532e03
master_replid2:0000000000000000000000000000000000000000
master_repl_offset:140
second_repl_offset:-1
repl_backlog_active:1
repl_backlog_size:1048576
repl_backlog_first_byte_offset:1
repl_backlog_histlen:140
# CPU
used_cpu_sys:0.21
used_cpu_user:0.12
used_cpu_sys_children:0.00
used_cpu_user_children:0.00
# Cluster
cluster_enabled:1
# Keyspace
127.0.0.1:7001>
root@ubuntu:/home/sa/Downloads/redis-4.0.1/src#
看完上述內容,你們掌握客戶端使用redis-cli連接redis集群的方法了嗎?如果還想學到更多技能或想了解更多相關內容,歡迎關注億速云行業資訊頻道,感謝各位的閱讀!
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。