Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The client connects to the redis cluster using redis-cli

2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Clients connect to redis clusters using redis-cli? I believe that many inexperienced people are helpless about this. For this reason, this article summarizes the causes and solutions of the problem. Through this article, I hope you can solve this problem.

The details are as follows:

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#After reading the above content, do you know how to connect redis cluster with redis-cli client? If you still want to learn more skills or want to know more related content, welcome to pay attention to the industry information channel, thank you for reading!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report