Two UX changes on the swap panel:
1. Body rows shifted from (total, used, free) to (total, sin, sout).
``used`` and ``free`` are derivable from ``percent`` + ``total`` so
showing them on dedicated lines is redundant. Replacing them with
the swap I/O rates surfaces actionable live paging activity:
SWAP 25.0%
total 16.0G
sin 97.7K/s
sout 0B/s
On cycle 1 the rates are absent (no baseline yet); the renderer
shows ``-`` for both fields and stays the same height.
2. ``sin`` / ``sout`` are watched but ship **no default thresholds**.
Sustained swap traffic is host-specific (database servers may
page steadily by design), so alerts only fire when the user opts
in via ``[memswap]`` in glances.conf. Suggested ladder shipped
commented:
# sin_careful=40960
# sin_warning=409600
# sin_critical=819200
# (and the same for sout)
≈ 40 / 400 / 800 KB/s. ``watched=True`` lets the framework wire
the levels when the user uncomments them; absent defaults +
``read_thresholds → {} → _compute_levels_for_item skips``
guarantees silence on a stock install.
5 new tests:
- ``test_sin_sout_are_watched_without_default_thresholds`` — schema
asserts.
- ``test_sin_sout_no_levels_without_user_thresholds`` — runtime
confirms no _levels entries for sin/sout when config is stock.
- ``test_sin_threshold_from_config_triggers_level`` — config-set
``sin_warning=10000`` actually fires a warning at 15_000 bytes/s.
- ``test_render_body_rows_have_total_sin_sout`` /
``test_render_does_not_show_used_or_free`` /
``test_render_handles_missing_sin_sout_on_first_cycle`` — renderer
layout contract.
Full v5 suite: 692 passed (+5), lint clean.
- ``conf/glances.conf``: add a commented ``[outputs] enable_mcp``
entry above the existing ``mcp_path`` / ``mcp_allowed_hosts`` keys.
Notes that the gate is off by default and that ``--enable-mcp``
flips it via the config overlay.
- ``docs/architecture/glances-v5-architecture-decisions.md``: new
§11 "MCP endpoint" covering:
- §11.1 opt-in lifecycle (CLI + config)
- §11.2 adapter architecture + flow diagram
- §11.3 resource/prompt inventory with v5 status per entry
- §11.4 known v5 gaps (logged on mount)
- §11.5 alert schema (v5-native, no v4 translation — decision
logged in the G3-MCP plan)
- §11.6 auth (HTTP middleware passes SSE through; no special MCP
middleware needed)
- §11.7 DNS rebinding (independent ``mcp_allowed_hosts``)
- §11.8 out of scope (history buffer, unported v4 plugins,
WebSocket transport)
- Add [mpp] section to conf/glances.conf with disable=True
- Add docs/aoa/mpp.rst documentation page and index entry
- Add unit test test_026_mpp with Rockchip MPP test fixtures