mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-10-26 05:29:45 +00:00
6cd7e1c7c1
Patrol treated every guest's cluster-resources memory as cache-inclusive, so an LXC without a linked Pulse agent, which only ever gets that source, lost memory pressure entirely: no triage flag, forecast or anomaly at 97% of its limit, a "may include reclaimable cache" caveat in the seed, and older memory alerts sent to model review every run with any resolve verdict discarded. The premise holds for QEMU but not for LXC. Proxmox's container mem is cgroup usage with page cache already subtracted: PVE::CGroup's get_memory_stat returns memory.current minus memory.stat file (cgroup v2) or usage_in_bytes minus total_cache (v1), PVE::LXC::vmstatus reports it as mem, and pvestatd feeds that value to the RRD that /cluster/resources reads. A QEMU guest's listing mem is the host's view of guest RAM and does count the guest's cache. Qualification now takes the guest kind. A current, dated cluster-resources reading establishes pressure for a Proxmox container and stays unknown for QEMU; status-mem, status-freemem and derived-total-minus-used stay cache-inclusive for both, and retained readings still cannot prove pressure. The typed read state derives the kind from the resource type, so Patrol, the observer and AI queries agree. The calculateLXCMemory comment that called the listing value cache-inclusive is corrected. Contract-Neutral: monitoring change is a corrected comment in calculateLXCMemory and its tests; LXC memory collection and sources are unchanged