Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

SOLR-16605: fix CPU calculaton in cloud->nodes UI tab

Shawn Heisey5884467f4902
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index ff425e966d1..08b0699cd43 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -151,6 +151,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;