mirror of
https://github.com/Crosstalk-Solutions/project-nomad.git
synced 2026-04-04 07:46:16 +02: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
e638623933
commit
bfdad03936
|
|
@ -18,7 +18,7 @@ export default function SettingsPage(props: {
|
||||||
})
|
})
|
||||||
|
|
||||||
const memoryUsagePercent = info?.mem.total
|
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
|
: 0
|
||||||
|
|
||||||
const swapUsagePercent = info?.mem.swaptotal
|
const swapUsagePercent = info?.mem.swaptotal
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user