From 714b135afa45f9a69d21507c2e76649c93d88c4d Mon Sep 17 00:00:00 2001 From: DL6ER Date: Wed, 26 Feb 2025 20:10:41 +0100 Subject: [PATCH] We should show load, not CPU% Signed-off-by: DL6ER --- scripts/js/footer.js | 32 ++++++++++++++------------------ 1 file changed, 14 insertions(+), 18 deletions(-) diff --git a/scripts/js/footer.js b/scripts/js/footer.js index 63197d35..c5c53643 100644 --- a/scripts/js/footer.js +++ b/scripts/js/footer.js @@ -360,37 +360,33 @@ function updateSystemInfo() { $("#sysinfo-memory-swap").text("No swap space available"); } - color = system.cpu.load.percent[0] > 100 ? "text-red" : "text-green-light"; + color = system.cpu.load.raw[0] > system.cpu.nprocs ? "text-red" : "text-green-light"; $("#cpu").html( '  CPU: ' + - system.cpu.load.percent[0].toFixed(1) + - " %" + '">  Load: ' + + system.cpu.load.raw[0].toFixed(2) + + " / " + + system.cpu.load.raw[1].toFixed(2) + + " / " + + system.cpu.load.raw[2].toFixed(2) ); $("#cpu").prop( "title", - "Load: " + - system.cpu.load.raw[0].toFixed(2) + - " " + - system.cpu.load.raw[1].toFixed(2) + - " " + - system.cpu.load.raw[2].toFixed(2) + - " on " + + "Shown load metrics are load averages for the past 1, 5, and 15 minutes on a system having " + system.cpu.nprocs + - " cores running " + + " cores and running " + system.procs + " processes" ); - $("#sysinfo-cpu").text( - system.cpu.load.percent[0].toFixed(1) + - "% (load: " + + $("#sysinfo-cpu").html( + "Load: " + system.cpu.load.raw[0].toFixed(2) + - " " + + " / " + system.cpu.load.raw[1].toFixed(2) + - " " + + " / " + system.cpu.load.raw[2].toFixed(2) + - ") on " + + " on " + system.cpu.nprocs + " cores running " + system.procs +