mirror of
https://github.com/Dokploy/dokploy.git
synced 2026-06-15 20:25:23 +02:00
fix: use actual memory usage excluding cache/buffers in monitoring
- Replace v.Used with (Total - Available) calculation - Provides accurate memory usage for monitoring alerts - Prevents false alerts caused by Linux cache/buffers - Aligns with 'free -h' available memory metric
This commit is contained in:
@@ -130,7 +130,8 @@ func GetServerMetrics() database.ServerMetric {
|
||||
}
|
||||
|
||||
memTotalGB := float64(v.Total) / 1024 / 1024 / 1024
|
||||
memUsedGB := float64(v.Used) / 1024 / 1024 / 1024
|
||||
memAvailableGB := float64(v.Available) / 1024 / 1024 / 1024
|
||||
memUsedGB := memTotalGB - memAvailableGB
|
||||
memUsedPercent := (memUsedGB / memTotalGB) * 100
|
||||
|
||||
var networkIn, networkOut float64
|
||||
|
||||
Reference in New Issue
Block a user