#5209 "Docker views: readable names, CPU/memory in cores and bytes, failures listed with since-time" (milestone 477 "UI problems first"). - A swarm task reads as its service and slot ("codex_db · 1", or the node for a global service), with the raw name in the title: Docker page, host panel, busiest widget, container detail. - CPU reads in cores (Docker's 100% = one core), toned by its share of the host's CPUs from the agent's per-core series. Memory reads in bytes, against a limit only when one is really set (Docker reports host RAM otherwise). - Exit 137/143 without an OOM kill is a stop, not a failure: no exited_nonzero, no crash-loop death, no "failed (24h)", dim exit code. - "Failed (24h)" is a list (Docker page #failures, linked from the widget and the tile): plain containers by their deaths, swarm services by Swarm's failed tasks; a second manager's copy of a task death counts once. - Failing swarm services lead Needs attention; services sort problems first with since-times on the page, the widget and the Swarm page; nodes that are down or drained sort first. - Busiest widget orders by a 5-minute CPU average so the list holds still. - Host panel: a table, problems first with what is wrong and since when; replaced swarm tasks hidden and counted. - Container detail: node hostname, I/O labelled "since start", Restarts hidden for swarm tasks with a note on where task failures are. - Widget names: "Docker — Services & failures", "Docker — Busiest containers". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
27 lines
1.3 KiB
HTML
27 lines
1.3 KiB
HTML
{#- A container's CPU and memory as service.usage() describes them (#5209).
|
|
|
|
Docker counts CPU per core (100% = one core busy), so CPU reads as cores,
|
|
toned by its share of the host's CPUs when the host's core count is known.
|
|
Memory reads in bytes, against a limit only when one is actually set;
|
|
mem_pct is then a share of that limit, otherwise of the host's memory. -#}
|
|
|
|
{% macro cores(n) -%}
|
|
{{ "%.2f"|format(n) if n < 1 else "%.1f"|format(n) }} {{ "core" if n == 1 else "cores" }}
|
|
{%- endmacro %}
|
|
|
|
{% macro cpu(u) -%}
|
|
{%- if u.cores is none -%}<span class="tone-dim">—</span>
|
|
{%- else -%}
|
|
<span class="tone-{{ status_class(u.cpu_share, 'cpu') }}"
|
|
title="Docker counts CPU per core: {{ '%.0f'|format(u.cores * 100) }}% of one core{% if u.cpus %}, {{ '%.1f'|format(u.cpu_share) }}% of this host's {{ u.cpus }} core{{ 's' if u.cpus != 1 }}{% endif %}">{{ cores(u.cores) }}</span>
|
|
{%- endif -%}
|
|
{%- endmacro %}
|
|
|
|
{% macro mem(u) -%}
|
|
{%- if u.mem_bytes is none -%}<span class="tone-dim">—</span>
|
|
{%- else -%}
|
|
<span class="tone-{{ status_class(u.mem_pct, 'mem') if u.mem_of else 'dim' }}"
|
|
title="{% if u.mem_pct is not none and u.mem_of %}{{ '%.1f'|format(u.mem_pct) }}% of {{ u.mem_of }}{% else %}No memory limit set{% endif %}">{{ u.mem_bytes|bytes }}{% if u.mem_limit %} / {{ u.mem_limit|bytes }}{% endif %}</span>
|
|
{%- endif -%}
|
|
{%- endmacro %}
|