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:
@@ -136,11 +136,12 @@ The app catalog lives in a separate Git repository. The controller:
|
||||
- User-configurable inputs (admin password, language, storage path) remain editable
|
||||
- Section header prompts the user to note down any passwords they need
|
||||
3. `checkBeforeDeploy()` JS guard fetches live state first (prevents double-deploy from another tab)
|
||||
4. **Memory validation** checks `mem_request` against available RAM:
|
||||
4. **Memory validation** uses real system memory from `/proc/meminfo`:
|
||||
- `usable_memory = total_ram - reserved_memory_mb` (default 384MB reserved)
|
||||
- `CommittedMemory()` only counts running/starting/unhealthy apps — stopped/exited apps are excluded (they don't consume RAM)
|
||||
- Hard block if requests exceed usable memory
|
||||
- Soft warning if limits exceed total RAM (overcommit OK)
|
||||
- `system.GetMemoryMB()` returns real-time total and used memory (not declared reservations)
|
||||
- Hard block if `used_mb + new_request > usable_memory`
|
||||
- `CommittedMemory()` (declared sum) still used for soft overcommit warning only
|
||||
- Deploy page shows real memory usage bar (not declared reservations)
|
||||
5. Pre-generated secret values are submitted as hidden form inputs so the **same values** the user saw are saved to `app.yaml` (no silent re-generation on submit). Controller saves `app.yaml`, sets in-memory `Deployed` flag **before** `docker compose up -d` (avoids stale UI during slow image pulls), reverts on failure
|
||||
6. 3-step progress panel polls `GET /api/stacks/{name}` every 3s: config saved → containers starting → health check passed
|
||||
7. Post-deploy: locked fields (DB_PASSWORD, etc.) become read-only; the "Automatikusan generált értékek" section continues to show the saved values on the settings page
|
||||
@@ -560,6 +561,7 @@ Legacy pinger (`internal/monitor/pinger.go`) still runs for backward compatibili
|
||||
Full-page system monitor at `/monitoring`:
|
||||
- **System Overview**: hostname, OS, kernel, CPU model/cores, uptime
|
||||
- **System Metrics Charts**: 4 line charts (CPU, Memory, Temperature, Load) in 2x2 grid
|
||||
- **Memory Distribution Bar**: stacked bar showing per-container memory usage, OS/system overhead, and free memory (real-time from `/proc/meminfo` + container stats)
|
||||
- **Container Resources**: horizontal bar charts (CPU% and Memory per container)
|
||||
- **Per-container Detail**: click-to-expand historical charts
|
||||
- **Hub Connection Status**: shows Hub URL, customer ID, connection state (connected/unreachable), last successful push, last error
|
||||
|
||||
Reference in New Issue
Block a user