In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly introduces the use of the Info instruction in Redis, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let the editor take you to understand it.
Redis provides the info instruction, which returns various information and statistical values about the Redis server. When using Redis, we often encounter some problems that we need to troubleshoot. At this time, we can obtain the running status of Redis through info instructions, and then troubleshoot the problems.
Given the optional parameter section, you can have the command return only a portion of the information:
Server: general information of the Redis server
Clients: the connection part of the client
Memory: memory consumption related information
Persistence: information about RDB and AOF
Stats: general statistics
Replication: master / slave replication information
Cpu: statistics of CPU consumption
Commandstats: Redis command statistics
Cluster: Redis cluster information
Keyspace: related statistics of database
It can also take the following values:
All: returns all information
Default: the value returns the information of the default setting
If no parameters are used, the default is default, which returns all the information.
Info/info all
Returns all the information of the Redis service
# Serverredis_version:6.2.4redis_git_sha1:00000000redis_git_dirty:0redis_build_id:fa652e749408dcfdredis_mode:standaloneos:Linux 3.10.0-327.el7.x86_64 x86_64arch_bits:64multiplexing_api:epollatomicvar_api:c11-builtingcc_version:9.3.1process_id:4617process_supervised:norun_id:9662797d01b55345cd6cabad38d102e27db19e66tcp_port:6379server_time_usec:1632494557942546uptime_in_seconds:4uptime_in_days:0hz:10configured_hz:10lru_clock:5104605executable:/usr/ Local/soft/redis-6.2.4/src/redis-serverconfig_file:/usr/local/soft/redis-6.2.4/redis.confio_threads_active:0# Clientsconnected_clients:1cluster_connections:0maxclients:10000client_recent_max_input_buffer:16client_recent_max_output_buffer:0blocked_clients:0tracking_clients:0clients_in_timeout_table:0# Memoryused_memory:874728used_memory_human:854.23Kused_memory_rss:10207232used_memory_rss_human:9 .73Mused _ memory_peak:932800used_memory_peak_human:910.94Kused_memory_peak_perc:93.77%used_memory_overhead:830808used_memory_startup:810168used_memory_dataset:43920used_memory_dataset_perc:68.03%allocator_allocated:1036080allocator_active:1380352allocator_resident:3932160total_system_memory:1913507840total_system_memory_human:1.78Gused_memory_lua:37888used_memory_lua_human:37.00Kused_memory_scripts:0used_memory_scripts_human:0Bnumber_of _ cached_scripts:0maxmemory:104857600maxmemory_human:100.00Mmaxmemory_policy:volatile-lfuallocator_frag_ratio:1.33allocator_frag_bytes:344272allocator_rss_ratio:2.85allocator_rss_bytes:2551808rss_overhead_ratio:2.60rss_overhead_bytes:6275072mem_fragmentation_ratio:12.27mem_fragmentation_bytes:9375272mem_not_counted_for_evict:0mem_replication_backlog:0mem_clients_slaves:0mem_clients_normal:20496mem_aof_buffer:0mem_allocator:jemalloc-5.1.0active _ defrag_running:0lazyfree_pending_objects:0lazyfreed_objects:0# Persistenceloading:0current_cow_size:0current_cow_size_age:0current_fork_perc:0.00current_save_keys_processed:0current_save_keys_total:0rdb_changes_since_last_save:0rdb_bgsave_in_progress:0rdb_last_save_time:1632494553rdb_last_bgsave_status:okrdb_last_bgsave_time_sec:-1rdb_current_bgsave_time_sec:-1rdb_last_cow_size : 0aof_enabled:0aof_rewrite_in_progress:0aof_rewrite_scheduled:0aof_last_rewrite_time_sec:-1aof_current_rewrite_time_sec:-1aof_last_bgrewrite_status:okaof_last_write_status:okaof_last_cow_size:0module_fork_in_progress:0module_fork_last_cow_size:0# Statstotal_connections_received:1total_commands_processed:1instantaneous_ops_per_sec:0total_net_input_bytes:31total_net_output_bytes : 20324instantaneous_input_kbps:0.00instantaneous_output_kbps:0.00rejected_connections:0sync_full:0sync_partial_ok:0sync_partial_err:0expired_keys:0expired_stale_perc:0.00expired_time_cap_reached_count:0expire_cycle_cpu_milliseconds:0evicted_keys:0keyspace_hits:0keyspace_misses:0pubsub_channels:0pubsub_patterns:0latest_fork_usec:0total_forks:0migrate_cached_sockets:0slave_expires_tracked_keys:0active_defrag_hits:0active_defrag _ misses:0active_defrag_key_hits:0active_defrag_key_misses:0tracking_total_keys:0tracking_total_items:0tracking_total_prefixes:0unexpected_error_replies:0total_error_replies:0dump_payload_sanitizations:0total_reads_processed:2total_writes_processed:1io_threaded_reads_processed:0io_threaded_writes_processed:0# Replicationrole:masterconnected_slaves:0master_failover_state:no-failovermaster_replid:5b43385d46f4a601c025cb2c4ce5706b0b77db86master_replid2:0000000000000000000000000000000000000000master_repl_offset:0second_repl_offset:- 1repl_backlog_active:0repl_backlog_size:1048576repl_backlog_first_byte_offset:0repl_backlog_histlen:0# CPUused_cpu_sys:0.030666used_cpu_user:0.000000used_cpu_sys_children:0.000000used_cpu_user_children:0.000000used_cpu_sys_main_thread:0.030570used_cpu_user_main_thread:0.000000# Modules# Errorstats# Clustercluster_enabled:0# Keyspacedb0:keys=2 Expires=0,avg_ttl=0info server
Here is all the information related to server
Parameter name means redis_versionRedis server version redis_git_sha1Git SHA1redis_git_dirtyGit dirty flagredis_build_id builds IDredis_mode server mode (standalone Sentinel or cluster) the host operating system arch_bits architecture (32 or 64 bit) of the osRedis server event handling mechanism used by atomicvar_apiRedis when compiling Redis the GCC version of the process_id server process's PIDrun_idRedis server random identifier (for Sentinel and clustering) tcp_portTCP/IP listening port uptime_in_seconds since the Redis server was started Number of seconds elapsed uptime_in_days number of days elapsed since the Redis server started, the frequency of the hz server sets lru_clock to increment the clock in minutes, which is used by LRU to manage the executable file path of the executable server config_file configuration file path
Info clients
Here is all the information related to clients
Parameter name means the number of connected_clients connected clients (excluding clients connected through secondary servers) the number of clients currently connected to client_longest_output_list, the longest output list client_biggest_input_buf currently connected, the maximum input cache blocked_clients waiting for blocking commands (BLPOP, BRPOP, BRPOPLPUSH)
Info memory
Here is all the information related to memory
The parameter name means the total amount of memory allocated by used_memory by the Redis allocator. Used_memory_human returns the total amount of memory allocated by Redis in human-readable format. Used_memory_rss returns the total amount of memory allocated by Redis (commonly known as resident set size) from the point of view of the operating system. This value is consistent with the output of top, ps, and so on. Peak memory consumption of used_memory_peakRedis (in bytes) used_memory_peak_human returns peak memory consumption of Redis in human-readable format used_memory_peak_perc percentage of peak memory used _ sum of all overhead allocated by the memory_overhead server to manage its internal data structure (in bytes) the initial amount of memory consumed by used_memory_startupRedis at startup (in bytes) used_memory_dataset dataset size in bytes (used_memory minus used_memory_overhead) used_memory_dataset_percused_memory_dataset as a percentage of net memory usage (used_memory minus used_memory_startup) the total amount of memory that the total_system_memoryRedis host has total_system_memory_human returns the total memory of the Redis host in a human-readable format Memory size used (in bytes) used_memory_lua_human returns the memory size used by the Lua engine in a human-readable format the value of the maxmemorymaxmemory configuration instruction maxmemory_human returns the value of the maxmemory configuration instruction the value of the maxmemory_policymaxmemory-policy configuration instruction the ratio between mem_fragmentation_ratioused_memory_rss and used_memory specified by mem_allocator at compile time The memory allocator used by Redis. It can be libc, jemalloc, or tcmallocactive_defrag_running 's flag indicating whether active defragmentation is active or the number of objects lazyfree_pending_objects is waiting to be released (due to calls to UNLINK or FLUSHDB and FLUSHALL using the ASYNC option)
Ideally, the value of used_memory_rss should be only slightly higher than that of used_memory. When rss > used, and the difference between the two values is large, it indicates that there is memory fragmentation (internal or external). The ratio of memory fragmentation can be seen by the value of mem_fragmentation_ratio. When used > rss, part of the memory of the Redis is swapped out to swap space by the operating system, in which case the operation may cause significant latency. Because Redis has no control over how its allocated memory maps to memory pages, the high level of resident memory (used_memory_rss) is usually the result of a surge in memory usage. When Redis frees memory, the memory is returned to the allocator, which may or may not return memory to the operating system. If Redis frees memory but does not return it to the operating system, the value of used_memory may not match the Redis footprint displayed by the operating system. Check the value of used_memory_peak to verify that this is happening.
Info persistence
Here is all the persistence-related information:
The meaning of the parameter name loading indicates whether the load of the dump file (dump) is in progress. The number of changes to the rdb_changes_since_last_save since the last dump rdb_bgsave_in_progress indicates whether the RDB file is being saved. The flag rdb_last_save_time last successfully saved RDB's chronological-based timestamp rdb_last_bgsave_status the status of the last RDB save operation rdb_last_bgsave_time_sec last time Duration of RDB save operation (in seconds) duration of rdb_current_bgsave_time_sec ongoing RDB save operation (if any) rdb_last_cow_size the size of bytes allocated by copy-on-write during the last RDB save operation aof_enabled indicates that the AOF record has been activated flag aof_rewrite_in_progress indicates that the AOF rewrite operation is in progress flag aof_rewrite_scheduled indicates that once the ongoing RDB save operation is complete The flag for the AOF rewrite operation, the duration of the last AOF rewrite operation of aof_last_rewrite_time_sec, is scheduled. Duration in seconds of aof_current_rewrite_time_sec 's ongoing AOF rewrite operation (if any) aof_last_bgrewrite_status status of last AOF rewrite operation aof_last_write_status status of last AOF write operation aof_last_cow_size size of bytes allocated by copy-on-write during the last AOF rewrite operation
Changes_since_last_save refers to the number of operations that have changed in the dataset since the last time SAVE or BGSAVE was called.
AOF
If AOF is enabled, the following additional fields are added:
The parameter name means aof_current_size current AOF file size aof_base_size the AOF file size when it was last started or rewritten aof_pending_rewrite indicates whether the AOF rewrite operation will be performed immediately after the current RDB save operation is completed. Aof_buffer_lengthAOF buffer size aof _ rewrite_buffer_lengthAOF rewrite buffer size Aof _ pending_bio_fsync number of tasks waiting in the background IO queue for fsync processing aof_delayed_fsync delay fsync counter loading
If you are performing a load operation, these additional fields will be added:
The parameter name means the start time of the loading_start_time load operation (based on the epoch-based timestamp) the total size of the loading_total_bytes file the number of bytes loaded by loading_loaded_bytes the percentage of bytes loaded by loading_loaded_perc the percentage of loading _ eta_seconds expected to be completed by loading status
Here is all the stats-related information:
The parameter name means the total number of connections accepted by the total_connections_received server, the total number of commands processed by the total_commands_processed server, the number of commands per second rejected_connections rejected due to maxclients restrictions, the total number of expired_keyskey expiration events evicted_keys due to maxmemory restrictions, the number of key expelled due to maxmemory restrictions, the number of times keyspace_hits successfully found key in the main dictionary, the number of times keyspace_misses looked up in the main dictionary. Number of times pubsub_channels failed to find key the number of global pub/sub channels that pubsub_patterns has client subscriptions pubsub_patterns has global pub/sub patterns subscribed by client latest_fork_usec duration of the latest fork operation Info replication in microseconds
Here is all the replication-related information:
The parameter name means role the value is "master" if the instance is not a slave of any node, or "slave" if the instance synchronizes data from a node. Note that one slave node can be the master node of another slave node (daisy chain)
If the instance is a slave node, the following additional fields are provided:
The parameter name means the Host name or IP address of the master_host master node the TCP port master_link_status connection status (up or down) monitored by the master_port master node master_last_io_seconds_ago the number of seconds elapsed since the last interaction with the master node master_sync_in_progress indicates that the master node is synchronizing with the slave node
If a SYNC operation is in progress, the following fields are provided:
The parameter name means the number of bytes left before the master_sync_left_bytes synchronization is completed. The number of seconds master_sync_last_io_seconds_ago has had since the last IO transmission during the SYNC operation.
If the connection between the master and slave nodes is disconnected, an additional field is provided:
Parameter name indicates the number of seconds elapsed since master_link_down_since_seconds was disconnected
The following fields are always available:
The parameter name means the number of connected slave nodes of connected_slaves
For each slave node, the following lines will be added: slaveXXX id, address, port number, status
Info CPU
Here is all the cpu-related information:
The parameter name means used_cpu_sys system consumed by Redis server CPUused_cpu_user consumed by Redis server user CPUused_cpu_sys_children consumed by background process system CPUused_cpu_user_children consumed by background process user CPU consumed by background process
Info cluster
The cluster section currently contains only one unique field:
Parameter name cluster_enabled indicates that Redis cluster is enabled
Info keyspace
The keyspace section provides statistics about the main dictionary for each database, which is the total number of key and the total number of expired key, and for each database, the following lines are provided:
Parameter name meaning keyspacedbXXX keys=XXX,expires=XXX
Thank you for reading this article carefully. I hope the article "what is the use of Info instructions in Redis" shared by the editor will be helpful to you. At the same time, I also hope that you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.