mirror of
https://github.com/Crosstalk-Solutions/project-nomad.git
synced 2026-03-28 03:29:25 +01:00
fix(System): correct memory usage percentage calculation
The percentage was using (total - available) / total which excludes reclaimable buffers/cache, but the displayed "Used RAM" value uses mem.used which includes them. This mismatch showed 14% alongside 22 GB / 62 GB. Now uses mem.used / mem.total so the percentage matches the displayed numbers. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
b0be99700d
commit
812d13c3da
|
|
@ -18,7 +18,7 @@ export default function SettingsPage(props: {
|
|||
})
|
||||
|
||||
const memoryUsagePercent = info?.mem.total
|
||||
? (((info.mem.total - info.mem.available) / info.mem.total) * 100).toFixed(1)
|
||||
? ((info.mem.used / info.mem.total) * 100).toFixed(1)
|
||||
: 0
|
||||
|
||||
const swapUsagePercent = info?.mem.swaptotal
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user