Set total ram in compute section

This commit is contained in:
Peter Stockings
2025-12-24 10:04:35 +11:00
parent 6f31053b51
commit d1bb48138f

2
app.py
View File

@@ -310,6 +310,8 @@ def collect():
host_mem_total = int(sysinfo.get("mem_total") or 0)
ram_pct = (total_mem_used_bytes / host_mem_total * 100.0) if host_mem_total else 0.0
sysinfo["ram_total_h"] = format_bytes(host_mem_total)
# Docker disk: images "Size" and "Reclaimable"
df_images = sysinfo.get("system_df", {}).get("Images", {})
images_size_bytes = parse_human_bytes(df_images.get("size", "0B"))