{% extends "base.html" %} {% block title %}资源监控 - 机器人管理后台{% endblock %} {% block content %}
Resource Overview

资源监控

直接观察 ABOT 所在服务器的关键资源、应用进程和基础设施状态,不再依赖额外的 glances 进程。

最近刷新 {% raw %}{{ statusOverview.timestamp || '-' }}{% endraw %}
主机 {% raw %}{{ statusOverview.server.hostname || '-' }}{% endraw %}
PID {% raw %}{{ statusOverview.process.pid || '-' }}{% endraw %}
转图运行时 {% raw %}{{ runtimeTagText }}{% endraw %} {% raw %}{{ browserTagText }}{% endraw %} {% raw %}{{ md2imgBrief }}{% endraw %} {% raw %}{{ md2imgHealth.timestamp }}{% endraw %}
预热转图 刷新监控 重启服务

观察摘要

把当前最值得关注的风险先提到最上面,避免你每次都要自己扫完整页。

{% raw %}{{ alertItems.length ? `${alertItems.length} 条关注项` : '状态平稳' }}{% endraw %}
{% raw %}{{ item.title }}{% endraw %} {% raw %}{{ item.text }}{% endraw %}
当前没有明显异常项,主机资源、进程和基础设施都处于可接受范围。
CPU 使用率
{% raw %}{{ formatPercent(cpu.usage_percent) }}{% endraw %}
{% raw %}{{ cpu.logical_count || 0 }}{% endraw %} 线程 · load1 {% raw %}{{ formatNumber(cpu.load_1, 2) }}{% endraw %}
最近趋势 {% raw %}{{ trendSummary('cpu') }}{% endraw %}
内存使用率
{% raw %}{{ formatPercent(memory.usage_percent) }}{% endraw %}
{% raw %}{{ formatBytes(memory.used_bytes) }}{% endraw %} / {% raw %}{{ formatBytes(memory.total_bytes) }}{% endraw %}
最近趋势 {% raw %}{{ trendSummary('memory') }}{% endraw %}
主盘使用率
{% raw %}{{ formatPercent(disk.primary_usage_percent) }}{% endraw %}
{% raw %}{{ formatBytes(disk.primary_used_bytes) }}{% endraw %} / {% raw %}{{ formatBytes(disk.primary_total_bytes) }}{% endraw %}
最近趋势 {% raw %}{{ trendSummary('disk') }}{% endraw %}
网络速率
{% raw %}{{ formatSpeed(network.download_speed_bps) }}{% endraw %}
上行 {% raw %}{{ formatSpeed(network.upload_speed_bps) }}{% endraw %} · 连接 {% raw %}{{ network.established_connections || 0 }}{% endraw %}
累计上行 {% raw %}{{ formatBytes(network.bytes_sent) }}{% endraw %} 累计下行 {% raw %}{{ formatBytes(network.bytes_recv) }}{% endraw %}
下载趋势 {% raw %}{{ trendSummary('network') }}{% endraw %}

系统概览

观察主机、Python 运行环境和负载情况,快速判断是不是机器层面的问题。

主机名 {% raw %}{{ server.hostname || '-' }}{% endraw %}
操作系统 {% raw %}{{ server.os || '-' }}{% endraw %}
系统版本 {% raw %}{{ server.os_version || '-' }}{% endraw %}
Python {% raw %}{{ server.python_version || '-' }}{% endraw %}
开机时间 {% raw %}{{ server.boot_time || '-' }}{% endraw %}
系统运行时长 {% raw %}{{ formatDuration(server.uptime_seconds) }}{% endraw %}
Load 1 / 5 / 15 {% raw %}{{ formatNumber(cpu.load_1, 2) }} / {{ formatNumber(cpu.load_5, 2) }} / {{ formatNumber(cpu.load_15, 2) }}{% endraw %}
CPU 核心 {% raw %}{{ cpu.physical_count || 0 }}{% endraw %} 物理 / {% raw %}{{ cpu.logical_count || 0 }}{% endraw %} 逻辑
Swap 使用率 {% raw %}{{ formatPercent(memory.swap_usage_percent) }}{% endraw %}

ABOT 进程

确认当前应用自身的资源占用,避免只看主机而忽略进程级热点。

PID {% raw %}{{ process.pid || '-' }}{% endraw %}
进程 CPU {% raw %}{{ formatPercent(process.cpu_percent) }}{% endraw %}
进程内存 {% raw %}{{ formatBytes(process.memory_rss_bytes) }}{% endraw %}
内存占比 {% raw %}{{ formatPercent(process.memory_percent) }}{% endraw %}
线程数 {% raw %}{{ process.thread_count || 0 }}{% endraw %}
打开文件 {% raw %}{{ process.open_files || 0 }}{% endraw %}
进程启动时间 {% raw %}{{ process.create_time || '-' }}{% endraw %}
进程运行时长 {% raw %}{{ formatDuration(process.uptime_seconds) }}{% endraw %}

基础设施运行态

把数据库和缓存的关键摘要放在同一屏里,日常看状态不需要再跳出去。

MySQL
{% raw %}{{ infrastructure.mysql.summary || '暂无状态' }}{% endraw %}
{% raw %}{{ statusText(infrastructure.mysql.status) }}{% endraw %}
数据库{% raw %}{{ infrastructure.mysql.database || '-' }}{% endraw %}
版本{% raw %}{{ infrastructure.mysql.version || '-' }}{% endraw %}
连接数{% raw %}{{ infrastructure.mysql.threads_connected || 0 }}{% endraw %} / {% raw %}{{ infrastructure.mysql.max_connections || '-' }}{% endraw %}
连接负载{% raw %}{{ formatPercent(infrastructure.mysql.connection_usage_percent) }}{% endraw %}
运行线程{% raw %}{{ infrastructure.mysql.threads_running || 0 }}{% endraw %}
QPS{% raw %}{{ formatNumber(infrastructure.mysql.questions_per_second, 2) }}{% endraw %}
表数量{% raw %}{{ infrastructure.mysql.table_count || 0 }}{% endraw %}
库体量{% raw %}{{ formatMb(infrastructure.mysql.schema_size_mb) }}{% endraw %}
Redis
{% raw %}{{ infrastructure.redis.summary || '暂无状态' }}{% endraw %}
{% raw %}{{ statusText(infrastructure.redis.status) }}{% endraw %}
DB{% raw %}{{ infrastructure.redis.db_index || 0 }}{% endraw %}
Key 数量{% raw %}{{ infrastructure.redis.key_count || 0 }}{% endraw %}
客户端{% raw %}{{ infrastructure.redis.connected_clients || 0 }}{% endraw %}
阻塞客户端{% raw %}{{ infrastructure.redis.blocked_clients || 0 }}{% endraw %}
OPS/s{% raw %}{{ infrastructure.redis.ops_per_sec || 0 }}{% endraw %}
命中率{% raw %}{{ formatPercent(infrastructure.redis.hit_rate_percent) }}{% endraw %}
已用内存{% raw %}{{ infrastructure.redis.used_memory_human || '-' }}{% endraw %}
峰值内存{% raw %}{{ infrastructure.redis.used_memory_peak_human || '-' }}{% endraw %}

磁盘挂载点

{% raw %}{{ diskMountBrief }}{% endraw %}

{% endblock %} {% block scripts %} {% endblock %}