缓存监控
GET
/api/monitor/cache请求参数
无
示例代码
返回响应
成功(200)
HTTP 状态码: 200
内容格式: JSONapplication/json
数据结构
code
integer
必需
msg
string
必需
data
object
必需
commandStats
array [object {2}]
必需
info
object
必需
dbSize
integer
必需
示例
{
"code": 200,
"msg": "成功",
"data": {
"commandStats": [
{
"name": "hget",
"value": "92"
},
{
"name": "info",
"value": "1"
},
{
"name": "exists",
"value": "99"
},
{
"name": "get",
"value": "92"
},
{
"name": "pexpire",
"value": "1"
},
{
"name": "hmset",
"value": "5"
},
{
"name": "hexists",
"value": "92"
},
{
"name": "setex",
"value": "5"
},
{
"name": "ping",
"value": "62"
},
{
"name": "pttl",
"value": "92"
}
],
"info": {
"aof_rewrite_scheduled": "0",
"number_of_cached_scripts": "0",
"mem_clients_slaves": "0",
"keyspace_misses": "7",
"mem_allocator": "jemalloc-5.1.0",
"multiplexing_api": "epoll",
"aof_last_write_status": "ok",
"used_memory_peak_perc": "100.08%",
"run_id": "7a40eb4a5c6e5a8250ddbb295a562a5233f7d00d",
"uptime_in_seconds": "27150",
"maxmemory": "0",
"active_defrag_hits": "0",
"atomicvar_api": "atomic-builtin",
"total_system_memory_human": "1.94G",
"gcc_version": "8.3.0",
"second_repl_offset": "-1",
"arch_bits": "64",
"master_repl_offset": "0",
"instantaneous_output_kbps": "0.00",
"instantaneous_input_kbps": "0.00",
"total_commands_processed": "540",
"repl_backlog_size": "1048576",
"sync_full": "0",
"sync_partial_err": "0",
"aof_last_cow_size": "0",
"configured_hz": "10",
"used_memory_startup": "791240",
"mem_clients_normal": "49694",
"used_cpu_user": "14.932976",
"aof_enabled": "0",
"redis_mode": "standalone",
"rdb_changes_since_last_save": "0",
"used_memory_lua": "37888",
"redis_build_id": "442b43d467cd2b03",
"connected_slaves": "0",
"expired_keys": "5",
"used_memory": "855784",
"active_defrag_misses": "0",
"active_defrag_key_misses": "0",
"used_memory_rss": "4562944",
"rdb_last_bgsave_status": "ok",
"process_id": "1",
"rejected_connections": "0",
"master_replid": "fbf50a8cb0e2cdf12d337e21b76dd4df6002f2a7",
"used_memory_rss_human": "4.35M",
"used_memory_scripts": "0",
"rdb_bgsave_in_progress": "0",
"rdb_last_cow_size": "417792",
"cluster_enabled": "0",
"tcp_port": "6379",
"os": "Linux 5.10.47-linuxkit x86_64",
"mem_replication_backlog": "0",
"aof_current_rewrite_time_sec": "-1",
"allocator_rss_ratio": "3.58",
"used_memory_overhead": "841174",
"repl_backlog_histlen": "0",
"slave_expires_tracked_keys": "0",
"used_cpu_sys": "18.821296",
"role": "master",
"used_memory_dataset_perc": "22.64%",
"expired_stale_perc": "0.00",
"allocator_frag_ratio": "1.20",
"client_recent_max_input_buffer": "2",
"aof_last_bgrewrite_status": "ok",
"used_memory_peak_human": "835.73K",
"hz": "10",
"used_memory_human": "835.73K",
"maxmemory_policy": "noeviction",
"rss_overhead_ratio": "1.25",
"mem_fragmentation_ratio": "5.61",
"rdb_last_bgsave_time_sec": "0",
"allocator_allocated": "847480",
"used_memory_dataset": "14610",
"blocked_clients": "0",
"used_cpu_sys_children": "0.009647",
"repl_backlog_active": "0",
"used_cpu_user_children": "0.003683",
"sync_partial_ok": "0",
"aof_rewrite_in_progress": "0",
"redis_git_sha1": "00000000",
"rdb_current_bgsave_time_sec": "-1",
"active_defrag_running": "0",
"aof_last_rewrite_time_sec": "-1",
"master_replid2": "0000000000000000000000000000000000000000",
"config_file": "",
"lazyfree_pending_objects": "0",
"used_memory_scripts_human": "0B",
"loading": "0",
"allocator_rss_bytes": "2621440",
"pubsub_channels": "0",
"used_memory_lua_human": "37.00K",
"db0": "keys=3,expires=1,avg_ttl=2021550",
"active_defrag_key_hits": "0",
"allocator_frag_bytes": "168328",
"migrate_cached_sockets": "0",
"redis_git_dirty": "0",
"total_system_memory": "2081669120",
"mem_aof_buffer": "0",
"rss_overhead_bytes": "925696",
"client_recent_max_output_buffer": "0",
"connected_clients": "1",
"mem_fragmentation_bytes": "3749152",
"lru_clock": "4637449",
"pubsub_patterns": "0",
"expired_time_cap_reached_count": "0",
"repl_backlog_first_byte_offset": "0",
"total_net_output_bytes": "33798",
"executable": "/data/redis-server",
"evicted_keys": "0",
"total_connections_received": "62",
"allocator_active": "1015808",
"mem_not_counted_for_evict": "0",
"redis_version": "5.0.5",
"total_net_input_bytes": "36596",
"latest_fork_usec": "143",
"maxmemory_human": "0B",
"used_memory_peak": "855784",
"allocator_resident": "3637248",
"keyspace_hits": "460",
"uptime_in_days": "0",
"instantaneous_ops_per_sec": "0",
"rdb_last_save_time": "1648799434"
},
"dbSize": 3
}
}
最后修改时间: 2 年前