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

Redis performance metrics monitoring command

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

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

Redis performance metrics monitoring command

In the process of learning, you must learn to often use help to understand the specific use of commands.

1.info (monitoring usually uses this command to read data)

127.0.0.1 purl 6379 > help info

INFO [section]

Summary: Get information and statistics about the server

Since: 1.0.0

Group: server

127.0.0.1 purl 6379 > info

# Server

Redis_version:3.0.7

Redis_git_sha1:00000000

Redis_git_dirty:0

Redis_build_id:8d64350b19f2f7d2

Redis_mode:standalone

Os:Linux 2.6.32-504.el6.x86_64 x861464

Arch_bits:64

Multiplexing_api:epoll

Gcc_version:4.4.7

Process_id:1096

Run_id:2fc6a6e9638de4b9bccce3def6b40bb7b69e5240

Tcp_port:6379

Uptime_in_seconds:1668

Uptime_in_days:0

Hz:10

Lru_clock:3766532

Config_file:/etc/redis/6379.conf

# Clients

Connected_clients:3

Client_longest_output_list:0

Client_biggest_input_buf:0

Blocked_clients:0

# Memory

Used_memory:856928

Used_memory_human:836.84K

Used_memory_rss:3223552

Used_memory_peak:856968

Used_memory_peak_human:836.88K

Used_memory_lua:36864

Mem_fragmentation_ratio:3.76

Mem_allocator:jemalloc-3.6.0

# Persistence

Loading:0

Rdb_changes_since_last_save:0

Rdb_bgsave_in_progress:0

Rdb_last_save_time:1480159872

Rdb_last_bgsave_status:ok

Rdb_last_bgsave_time_sec:-1

Rdb_current_bgsave_time_sec:-1

Aof_enabled:0

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

# Stats

Total_connections_received:2

Total_commands_processed:189

Instantaneous_ops_per_sec:0

Total_net_input_bytes:3340

Total_net_output_bytes:66405

Instantaneous_input_kbps:0.00

Instantaneous_output_kbps:0.04

Rejected_connections:0

Sync_full:0

Sync_partial_ok:0

Sync_partial_err:0

Expired_keys:0

Evicted_keys:0

Keyspace_hits:0

Keyspace_misses:0

Pubsub_channels:0

Pubsub_patterns:0

Latest_fork_usec:0

Migrate_cached_sockets:0

# Replication

Role:slave

Master_host:192.168.1.93

Master_port:6380

Master_link_status:up

Master_last_io_seconds_ago:9

Master_sync_in_progress:0

Slave_repl_offset:2283

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:0.97

Used_cpu_user:0.42

Used_cpu_sys_children:0.00

Used_cpu_user_children:0.00

# Cluster

Cluster_enabled:0

# Keyspace

Db0:keys=1,expires=0,avg_ttl=0

2.monitor (impact on performance, use with caution)

127.0.0.1 purl 6379 > help monitor

MONITOR-

Summary: Listen for all requests received by the server in real time

Since: 1.0.0

Group: server

127.0.0.1 purl 6379 > monitor

OK

1480161369.716981 [0 192.168.1.93 6380] "PING"

1480161379.816223 [0 192.168.1.93 6380] "PING"

1480161389.930811 [0 192.168.1.93 6380] "PING"

1480161400.047882 [0 192.168.1.93 6380] "PING"

1480161409.461477 [0 127.0.0.1 42333] "info"

1480161410.143357 [0 192.168.1.93 6380] "PING"

1480161420.267618 [0 192.168.1.93 6380] "PING"

1480161421.141619 [0 127.0.0.1 42333] "info"all"

1480161430.367934 [0 192.168.1.93 6380] "PING"

1480161440.496221 [0 192.168.1.93 6380] "PING"

3.slowlog

127.0.0.1 purl 6379 > help slowlog

SLOWLOG subcommand [argument]

Summary: Manages the Redis slow queries log

Since: 2.2.12

Group: server

127.0.0.1 purl 6379 > slowlog get

1) 1) (integer) 17

2) (integer) 1480161791

3) (integer) 12

4) 1) "config"

2) "set"

3) "slowlog-log-slower-than"

4) "10"

127.0.0.1 purl 6379 > slowlog len

(integer) 2

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