From 714b135afa45f9a69d21507c2e76649c93d88c4d Mon Sep 17 00:00:00 2001 From: DL6ER Date: Wed, 26 Feb 2025 20:10:41 +0100 Subject: [PATCH 1/3] 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 63197d356..c5c53643c 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 + From 98d162fa0168ca83084469ea807f727cca59b189 Mon Sep 17 00:00:00 2001 From: DL6ER Date: Thu, 27 Feb 2025 05:58:44 +0100 Subject: [PATCH 2/3] Show total CPU % on the settings / system info page Signed-off-by: DL6ER --- scripts/js/footer.js | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/scripts/js/footer.js b/scripts/js/footer.js index c5c53643c..559d3f8c0 100644 --- a/scripts/js/footer.js +++ b/scripts/js/footer.js @@ -377,16 +377,14 @@ function updateSystemInfo() { system.cpu.nprocs + " cores and running " + system.procs + - " processes" + " processes " + + (system.cpu.load.raw[0] > system.cpu.nprocs + ? " (load is higher than the number of cores)" + : "") ); $("#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 " + + system.cpu["%cpu"].toFixed(1) + + "% on " + system.cpu.nprocs + " cores running " + system.procs + From 362ffac148eb457cfe6c898b2e07382022e574c1 Mon Sep 17 00:00:00 2001 From: Dominik Date: Thu, 27 Feb 2025 19:37:35 +0100 Subject: [PATCH 3/3] Improve tooltip wording Co-authored-by: RD WebDesign Signed-off-by: Dominik --- scripts/js/footer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/js/footer.js b/scripts/js/footer.js index 559d3f8c0..adad050e6 100644 --- a/scripts/js/footer.js +++ b/scripts/js/footer.js @@ -373,7 +373,7 @@ function updateSystemInfo() { ); $("#cpu").prop( "title", - "Shown load metrics are load averages for the past 1, 5, and 15 minutes on a system having " + + "Load averages for the past 1, 5, and 15 minutes\non a system with " + system.cpu.nprocs + " cores and running " + system.procs +