我知道redis-cli以及info和config命令。但是,它们没有任何说明当前数据库大小的内容。我该如何解决?
最佳答案
使用INFO
命令。详细信息在这里:http://redis.io/commands/info
样本输出:
redis-cli
redis 127.0.0.1:6379> info
redis_version:2.4.11
redis_git_sha1:00000000
redis_git_dirty:0
arch_bits:64
multiplexing_api:kqueue
gcc_version:4.2.1
process_id:300
uptime_in_seconds:1389779
uptime_in_days:16
lru_clock:1854465
used_cpu_sys:59.86
used_cpu_user:73.02
used_cpu_sys_children:0.15
used_cpu_user_children:0.11
connected_clients:1
connected_slaves:0
client_longest_output_list:0
client_biggest_input_buf:0
blocked_clients:0
used_memory:1329424
used_memory_human:1.27M
used_memory_rss:2285568
used_memory_peak:1595680
used_memory_peak_human:1.52M
mem_fragmentation_ratio:1.72
mem_allocator:libc
loading:0
aof_enabled:0
changes_since_last_save:0
bgsave_in_progress:0
last_save_time:1360719404
bgrewriteaof_in_progress:0
total_connections_received:221
total_commands_processed:29926
expired_keys:2
evicted_keys:0
keyspace_hits:1678
keyspace_misses:3
pubsub_channels:0
pubsub_patterns:0
latest_fork_usec:379
vm_enabled:0
role:master
db0:keys=23,expires=0
关于redis - 如何查看我的Redis数据库current_size?,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/14844672/