首页 > 编程知识 正文

linux进入redis,linux查看redis是否安装

时间:2023-05-06 07:16:26 阅读:10786 作者:1978

server :的常规Redis服务器信息。 包括以下域:

redis_version : Redis服务器版本

redis_git_sha1 : Git SHA1

redis _ git _ dirty : gitdirtyflag

操作系统os : Redis服务器的主机操作系统

arch_bits :体系结构(32或64位) ) ) ) ) ) ) ) )。

multiplexing_api : Redis使用的事件处理机制

GCC_version :编译Redis时使用的gcc版本

process_id :服务器进程的PID

run_id : Redis服务器的随机标识符(用于Sentinel和群集)

tcp_port : TCP/IP监听端口

自uptime_in_seconds :启动Redis服务器以来经过的秒数

自uptime_in_days :启动Redis服务器以来经过的天数

lru_clock :是为了LRU管理而自增加的时钟

clients :连接到包含以下域的客户端信息:

connected_clients :所连接的客户端数量。 不包括通过从属服务器连接的客户端

client _ longest _ output _ list :当前连接的客户端中最长的输出列表

client_longest_input_buf :当前连接的客户端中的最大输入缓存

blocked_clients :正在等待块命令(BLPOP、BRPOP、BRPOPLPUSH )的客户端数量

内存:内存信息。 包括以下域:

used_memory :表示Redis分配器分配的内存总量(以字节为单位)

used_memory_human :以人可读的格式返回Redis分配的内存总量

从操作系统的角度看,used_memory_rss :返回Redis分配的内存总量(通常称为驻留集大小)

理想情况下,used_memory_rss的值应该略高于used_memory。

在rss used中,如果两者的值差异很大,则表示存在(内部或外部)内存碎片。

内存碎片率由mem_fragmentation_ratio的值可见。

对于used rss,操作系统已将表示Redis的部分内存交换到交换区域。 在这种情况下,操作可能会发生明显的延迟。

当Redis释放内存时,调度程序可能不会将内存返回操作系统。

如果Redis释放内存但未将内存返回操作系统,则used_memory的值可能与操作系统显示的Redis内存占用空间不匹配。

通过检查used_memory_peak的值,可以确定是否发生了这种情况。

used_memory :表示Redis分配器分配的内存总量(以字节为单位)

used_memory_human :以人可读的格式返回Redis分配的内存总量

从操作系统的角度看,used_memory_rss :返回Redis分配的内存总量(通常称为驻留集大小)。 该值与top、ps等命令的输出一致。

used_memory_peak : Redis内存消耗的峰值(以字节为单位)

used_memory_peak_human :以人类可读格式返回Redis内存消耗的峰值

total_system_memory:系统的总内存

total_system_memory_human:以可读格式返回系统的总内存

used_memory_lua_human:以可读格式返回Lua进程使用内存

used_memory_lua : Lua引擎使用的内存大小(以字节为单位)

mem _ fragmentation _ ratio : used_memory _ RSS与used _ memory的比率

mem_allocator :在编译时指定的Redis使用的内存分配器。 可以是libc、jemalloc或tcmalloc。

持久性:有关RDB和AOF的信息

集群: redis集群信息

复制—从主/从设备复制信息

slave-read-only:指定slave是否为只读,默认值为yes。 如果设置为no,则slave可以写入,但写入内容在主从同步完成后将被删除。

查看案例信息

用户管理测试环境:0INFO

#服务器

redis_version:3.0.7

redis_git_sha13360000000

redis_git_dirty:0

redis_build_id:55cb2c5b90a8107c

redis_mode:standalone

os:Linux 2.6.32-431.el6.x86_64 x86_64

arch_bits:64

multiplexing_api:epoll

gcc_version:4.4.7

process_id:956

run_id:3b6e527cd2098823de27e1ab6f6f63c94e90236c

tcp_port:6379

uptime_in_seconds:2752584

uptime_in_days:31

hz:10

lru_clock:10151213

config_file:/etc/redis.conf

# Clients

connected_clients:2

client_longest_output_list:0

client_biggest_input_buf:0

blocked_clients:0

# Memory

used_memory:986405152

used_memory_human:940.71M

used_memory_rss:1015296000

used_memory_peak:2074187984

used_memory_peak_human:1.93G

used_memory_lua:38912

mem_fragmentation_ratio:1.03

mem_allocator:jemalloc-3.6.0

# Persistence

loading:0

rdb_changes_since_last_save:24899322

rdb_bgsave_in_progress:0

rdb_last_save_time:1550902501

rdb_last_bgsave_status:ok

rdb_last_bgsave_time_sec:-1

rdb_current_bgsave_time_sec:-1

aof_enabled:1

aof_rewrite_in_progress:0

aof_rewrite_scheduled:0

aof_last_rewrite_time_sec:50

aof_current_rewrite_time_sec:-1

aof_last_bgrewrite_status:ok

aof_last_write_status:ok

aof_current_size:617299466

aof_base_size:476194543

aof_pending_rewrite:0

aof_buffer_length:0

aof_rewrite_buffer_length:0

aof_pending_bio_fsync:0

aof_delayed_fsync:2651

# Stats

total_connections_received:3584

total_commands_processed:20743673

instantaneous_ops_per_sec:3

total_net_input_bytes:48274967435

total_net_output_bytes:225738975

instantaneous_input_kbps:0.71

instantaneous_output_kbps:1.59

rejected_connections:0

sync_full:0

sync_partial_ok:0

sync_partial_err:0

expired_keys:0

evicted_keys:0

keyspace_hits:2425734

keyspace_misses:556182

pubsub_channels:0

pubsub_patterns:0

latest_fork_usec:247830

migrate_cached_sockets:0

# Replication:主/从复制信息

role:slave

master_host:10.6.168.66

master_port:6379

master_link_status:up

master_last_io_seconds_ago:0

master_sync_in_progress:0

slave_repl_offset:51778450840

slave_priority:100

slave_read_only:1

connected_slaves:0

master_repl_offset:0

repl_backlog_active:0

repl_backlog_size:1048576

repl_backlog_first_byte_offset:0

repl_backlog_histlen:0

# CPU

used_cpu_sys:2541.68

used_cpu_user:1687.96

used_cpu_sys_children:165.80

used_cpu_user_children:258.15

# Cluster

cluster_enabled:0

# Keyspace

db0:keys=279325,expires=8711,avg_ttl=0

db1:keys=8,expires=0,avg_ttl=0

db4:keys=101,expires=101,avg_ttl=0

db6:keys=460,expires=355,avg_ttl=0

db8:keys=2,expires=0,avg_ttl=0

查看单项Memory:

usermanage测试环境:0>info memory

used_memory:987157560

used_memory_human:941.43M

used_memory_rss:1015304192

used_memory_peak:2074187984

used_memory_peak_human:1.93G

used_memory_lua:38912

mem_fragmentation_ratio:1.03

mem_allocator:jemalloc-3.6.0

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。