You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@solr.apache.org by el...@apache.org on 2023/01/02 21:05:12 UTC

[solr] branch branch_9x updated: SOLR-16605: fix CPU calculaton in cloud->nodes UI tab

This is an automated email from the ASF dual-hosted git repository.

elyograg pushed a commit to branch branch_9x
in repository https://gitbox.apache.org/repos/asf/solr.git


The following commit(s) were added to refs/heads/branch_9x by this push:
     new 47f11da34e9 SOLR-16605: fix CPU calculaton in cloud->nodes UI tab
47f11da34e9 is described below

commit 47f11da34e9889717c11177d985385023fb86a4c
Author: Shawn Heisey <el...@apache.org>
AuthorDate: Mon Jan 2 14:00:23 2023 -0700

    SOLR-16605: fix CPU calculaton in cloud->nodes UI tab
---
 solr/CHANGES.txt                                | 2 ++
 solr/webapp/web/js/angular/controllers/cloud.js | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index d9f827639b5..f9e997e815c 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -127,6 +127,8 @@ Bug Fixes
 
 * SOLR-10458: Fix followRedirect property on HttpSolrClient not set when using Builder pattern. (Eric Pugh)
 
+* SOLR-16605: CPU percent calculation incorrect in admin UI cloud->nodes tab (Shawn Heisey)
+
 
 Build
 ---------------------
diff --git a/solr/webapp/web/js/angular/controllers/cloud.js b/solr/webapp/web/js/angular/controllers/cloud.js
index cc947864a1a..97f2327675a 100644
--- a/solr/webapp/web/js/angular/controllers/cloud.js
+++ b/solr/webapp/web/js/angular/controllers/cloud.js
@@ -383,7 +383,7 @@ var nodesSubController = function($scope, Collections, System, Metrics) {
 
           nodes[node]['uptime'] = (s.system.uptime || "unknown").replace(/.*up (.*?,.*?),.*/, "$1");
           nodes[node]['loadAvg'] = Math.round(s.system.systemLoadAverage * 100) / 100;
-          nodes[node]['cpuPct'] = Math.ceil(s.system.processCpuLoad);
+          nodes[node]['cpuPct'] = Math.ceil(s.system.processCpuLoad * 100);
           nodes[node]['cpuPctStyle'] = styleForPct(Math.ceil(s.system.processCpuLoad));
           nodes[node]['maxFileDescriptorCount'] = s.system.maxFileDescriptorCount;
           nodes[node]['openFileDescriptorCount'] = s.system.openFileDescriptorCount;