fix: narrow PR to verified bug fixes

This commit is contained in:
ajnart committed 2026-08-22 10:52:15 +02:00
1 parent 3f9941f9c7
commit 268c864801
8 files changed
+50 -123

No files matched your search

@@ -42,7 +42,10 @@ export class UnraidIntegration extends Integration implements ISystemHealthMonit
// Each entry in cpus[] is one logical CPU (thread). Dividing the summed per-thread
// utilization by the thread count (not physical cores) gives the correct average and
// avoids over-reporting on SMT systems. Guard against zero to avoid Infinity/NaN.
const cpuUtilizationNormalized = cpuCount > 0 ? cpuUtilization / cpuCount : 0;
let cpuUtilizationNormalized = 0;
if (cpuCount > 0) {
cpuUtilizationNormalized = cpuUtilization / cpuCount;
}
const totalMemory = systemInfo.info.memory.layout.reduce((acc, layout) => layout.size + acc, 0);
const usedMemory = totalMemory * (systemInfo.metrics.memory.percentTotal / 100);