{% extends "console/base.html" %} {% load ostium_ui %} {% block title %}系统{% endblock %} {% block breadcrumb %}系统{% endblock %} {% block page_header %}
{% icon "activity" "w-3.5 h-3.5" %} 运行状态

系统与诊断

进程、资源、doctor 检查与备份。诊断包会自动脱敏,可安全用于排障。

{% icon "download" %} 下载诊断包
{% csrf_token %}
{% endblock %} {% block content %}
Web{% icon "globe" %}
运行中
当前请求由 Gunicorn / Django 处理
Worker{% icon "cpu" %}
{% if state.worker_alive %}健康{% else %}离线{% endif %}
{% if state.heartbeat_age is not None %}心跳 {{ state.heartbeat_age|floatformat:0 }}s 前{% else %}没有心跳{% endif %}
sing-box{% icon "server" %}
{% if state.singbox_running %}PID {{ state.singbox_pid }}{% else %}停止{% endif %}
{{ singbox_version|truncatechars:40 }}
Jobs{% icon "clock" %}
qcluster
备份 / 证书 / 维护任务
{% icon "globe" %} 入口状态
{% if not entrypoint.configured %} 未配置公网地址 {% elif entrypoint.ok %} 服务器侧正常 {% else %} 入口异常 {% endif %}
{% if not entrypoint.configured %}
{% icon "info" %}
未设置 public_base_url,按 SSH 隧道或仅回环访问处理,不执行公网入口探测。
{% else %}
公开地址
{{ entrypoint.base_url }}
Caddy TLS(本机回环)
{% if entrypoint.local.ok %}PASS{% else %}FAIL{% endif %}
{{ entrypoint.local.detail|truncatechars:140 }}
公网 HTTPS
{% if entrypoint.public.ok %}PASS{% else %}FAIL{% endif %}
{{ entrypoint.public.detail|truncatechars:140 }}
入口证书
{% if entrypoint.local.cert_days is not None %} {{ entrypoint.local.cert_days }} 天后到期 {% else %} 未读取到证书 {% endif %}
{% if not entrypoint.ok %}
{% icon "alert" %}
服务器侧入口检查失败。网页和订阅共用 Caddy 8443,请先运行 sudo -u ostium ostium entrypoint check 查看具体失败项,再检查 Caddy、DNS、云防火墙和本地代理链路。
{% else %}

这里通过公网域名和 TLS 实际访问 /healthz。如果这里 PASS 但你本地仍打不开,问题在本地 DNS、Clash/TUN 路由或运营商链路,不在服务端入口。

{% endif %} {% endif %}
{% icon "database" %} 备份状态
{% if backup_overview.enabled %}自动备份已开启{% else %}自动备份已关闭{% endif %}
{% if backup_overview.enabled and not backup_overview.password_source %}
{% icon "alert" %}
自动备份已开启,但还没有配置备份密码。worker 会记录 backup.failed 审计并触发告警;请到「设置 → 自动备份密码」配置。
{% endif %}
最近自动备份
{% if backup_overview.latest_auto %} {{ backup_overview.latest_auto.created_at|datetimefmt }} ({{ backup_overview.latest_auto.created_at|ago }})
{{ backup_overview.latest_auto.filename }}
{% else %} 还没有自动备份 {% endif %}
下一次预计
{% if backup_overview.next_auto_at %} {{ backup_overview.next_auto_at|datetimefmt }} ({{ backup_overview.next_auto_label }};worker 每 5 分钟检查) {% else %} 自动备份已关闭 {% endif %}
备份总量
{{ backup_overview.total_count }} 份 · {{ backup_overview.total_size|bytes }}
备份盘空间
{{ backup_overview.disk_free|bytes }} 可用 / {{ backup_overview.disk_total|bytes }} 总量
密码来源
{% if backup_overview.password_source == "env" %} 环境变量 OSTIUM_BACKUP_PASSWORD {% elif backup_overview.password_source == "file" %} 页面密码文件 {% else %} 未设置 {% endif %}
备份目录
{{ backup_overview.directory }}

同盘备份不等于灾备。建议定期把 .ostb 复制到另一台机器或对象存储;备份文件本身已加密。

{% icon "gauge" %} 资源
CPU{{ cpu_percent|floatformat:1 }}%
内存{{ memory.used|bytes }} / {{ memory.total|bytes }}({{ memory.percent }}%)
数据盘{{ disk.used|bytes }} / {{ disk.total|bytes }}
负载
{{ loadavg.0|floatformat:2 }} {{ loadavg.1|floatformat:2 }} {{ loadavg.2|floatformat:2 }}
运行时间
{{ uptime|duration }}
版本
v{{ version }}
构建
{{ build_commit|truncatechars:12 }}
{% icon "shield" %} Doctor
{{ summary.pass }} pass {{ summary.warn }} warn {{ summary.fail }} fail
{% for check in checks %}
{{ check.name }}{{ check.detail|truncatechars:100 }} {{ check.status }} {% if check.fix %}{{ check.fix|truncatechars:90 }}{% endif %}
{% endfor %}
{% icon "download" %} 创建备份
{% csrf_token %} {% if form.non_field_errors %}
{{ form.non_field_errors }}
{% endif %}
{{ form.password }} {{ form.password.errors }} {{ form.password.help_text }}
{{ form.note }}
{% icon "database" %} 最近备份
{% if backups %}
{% for backup in backups %} {% endfor %}
文件 大小 创建 操作
{{ backup.filename }} {% if backup.note %}
{{ backup.note }}
{% endif %}
{{ backup.size|bytes }} {{ backup.created_at|ago }}
{% icon "download" "w-3.5 h-3.5" %} 下载
{% csrf_token %}
{% else %}
{% icon "database" %}
还没有备份
建议在每次升级前创建加密备份。
{% endif %}
{% icon "activity" %} 配置应用状态
{% if state.is_converged %}已同步{% else %}等待应用{% endif %}
已应用时间
{{ state.singbox_started_at|datetimefmt|default:"—" }}
内部修订号
{{ state.applied_revision }} / {{ state.desired_revision }}
配置哈希
{{ state.config_sha256|default:"—" }}
最近错误
{{ state.last_error|default:"无"|truncatechars:140 }}

内部修订号是配置变更计数,不是软件版本。左侧为 worker 已应用的版本,右侧为数据库期望的最新版本;两个数字相同表示配置已同步。

{% endblock %}