v0.27.3: Use real system memory everywhere, add monitoring memory bar

Deploy page, pre-start check, and deploy validation now use actual
/proc/meminfo usage instead of declared mem_request sums. New
GetMemoryMB() helper for lightweight real-time memory reads. Monitoring
page gains a stacked memory distribution bar showing per-container
usage, OS overhead, and free memory.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-23 10:06:03 +01:00
parent c33247abc1
commit ad4c005e01
10 changed files with 151 additions and 36 deletions
+10
View File
@@ -54,6 +54,16 @@ func GetTotalMemoryMB() (int, error) {
return int(info.TotalMemMB), nil
}
// GetMemoryMB returns total and used system memory in MB from /proc/meminfo.
func GetMemoryMB() (totalMB, usedMB int, err error) {
info := SystemInfo{}
readMemInfo(&info)
if info.TotalMemMB == 0 {
return 0, 0, fmt.Errorf("could not read MemTotal from /proc/meminfo")
}
return int(info.TotalMemMB), int(info.UsedMemMB), nil
}
func readMemInfo(info *SystemInfo) {
f, err := os.Open("/proc/meminfo")
if err != nil {