{% 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). Default view shows only the real on-disk filesystems, fullest-first — a Linux desktop's ~20 snap squashfs loop-mounts are hidden behind the "all mounts" drawer so the panel stays compact instead of scrolling for screens. ---- #}
disk usage
{% if disks_primary %}
{% for d in disks_primary %} {% set pct = d.percent or 0 %}
{{ d.mountpoint }}
{{ "%.0f"|format(pct) }}%
{% endfor %}
{% if mounts | length > disks_primary | length %}
show all {{ mounts | length }} mounts (+{{ mounts | length - disks_primary | length }} snap / virtual)
{% for n in mounts %} {% set d = n.row %} {% set pct = d.percent or 0 %} {% set leaf = d.mountpoint.split('/')[-1] %}
{% if n.depth > 0 %} {% for _ in range(n.depth - 1) %} {% endfor %} {% endif %} {{ d.mountpoint if n.depth == 0 else (leaf or d.mountpoint) }} {% if d.fstype %} {{ d.fstype }} {% endif %}
{{ "%.0f"|format(pct) }}%
{% endfor %}
{% endif %} {% else %}
no filesystems reported in latest run
{% endif %} {% else %}
no host_resources row in latest run
{% endif %}