{% from "partials/_macros.html" import card_header %}
{{ card_header("system resources") }} {% if resources %} {% set r = resources.row %} {% set u = r.uptime_seconds or 0 %} {# ---- current-value tiles ---- #}
memory
{{ "%.0f"|format(r.mem_percent) if r.mem_percent is not none else "—" }}%
{{ r.mem_used | human_bytes }} / {{ r.mem_total | human_bytes }}
swap
{{ "%.0f"|format(r.swap_percent) if r.swap_percent is not none else "—" }}%
{{ r.swap_used | human_bytes }} / {{ r.swap_total | human_bytes }}
cpu
{{ "%.0f"|format(r.cpu_percent) if r.cpu_percent is not none else "—" }}%
{{ r.cpu_count_logical or "?" }} cores
load avg
{% if r.load_1 is not none %} {{ "%.2f"|format(r.load_1) }} · {{ "%.2f"|format(r.load_5) }} · {{ "%.2f"|format(r.load_15) }} {% else %}—{% endif %}
1 · 5 · 15 min
uptime
{{ u // 86400 }}d {{ (u % 86400) // 3600 }}h {{ (u % 3600) // 60 }}m
tasks
{{ r.tasks_total if r.tasks_total is not none else "—" }} · {{ r.tasks_running or 0 }} run
{{ r.threads_total or 0 }} threads
{# ---- trend charts (filled by /api/chart/resources via dashboard.html JS) ---- #}
memory & swap %
cpu %
{# ---- per-core breakdown: a mini bar-strip so a hot core stands out at a glance (bar height + colour encode load; value on hover) instead of 16 near-identical text chips you have to read. ---- #} {% if resources.per_core %}
per-core cpu %
{% endif %} {# ---- disk usage (df) ---- #}
disk usage
{% if disks %}
{% for d in disks %} {% set pct = d.percent or 0 %} {% endfor %}
mount device fstype used / total %
{{ d.mountpoint }} {{ d.device }} {{ d.fstype }} {{ d.used | human_bytes }} / {{ d.total | human_bytes }} {{ "%.0f"|format(pct) }}%
{% else %}
no filesystems reported in latest run
{% endif %} {% else %}
no host_resources row in latest run
{% endif %}