Skip to content

Commit 812d13c

Browse files
chriscrosstalkclaude
authored andcommitted
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>
1 parent b0be997 commit 812d13c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

admin/inertia/pages/settings/system.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export default function SettingsPage(props: {
1818
})
1919

2020
const memoryUsagePercent = info?.mem.total
21-
? (((info.mem.total - info.mem.available) / info.mem.total) * 100).toFixed(1)
21+
? ((info.mem.used / info.mem.total) * 100).toFixed(1)
2222
: 0
2323

2424
const swapUsagePercent = info?.mem.swaptotal

0 commit comments

Comments
 (0)