Skip to content

Commit

Permalink
[ENTESB-20971] Hawtio console metrics shows free memory instead of used
Browse files Browse the repository at this point in the history
  • Loading branch information
rnetuka authored and tadayosi committed Mar 21, 2024
1 parent d4d34da commit 6e5380b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/runtime/metrics/metrics.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,14 @@ namespace Runtime {
let filterNumeric = this.$filter('number');
let cpuLoad = filterNumeric(metrics.SystemCpuLoad * 100, 2);
let loadAverage = filterNumeric(metrics.SystemLoadAverage, 2);
let memFree = this.formatBytes(metrics.FreePhysicalMemorySize);
let memTotal = this.formatBytes(metrics.TotalPhysicalMemorySize);
let memUsed = this.formatBytes(metrics.TotalPhysicalMemorySize - metrics.FreePhysicalMemorySize);
updateType = MetricType.SYSTEM;

updates.push(this.metricsService.createMetric('Available processors', metrics.AvailableProcessors));
updates.push(this.metricsService.createMetric('CPU load', cpuLoad, '%'));
updates.push(this.metricsService.createMetric('Load average', loadAverage));
updates.push(this.metricsService.createUtilizationMetric('Memory used', memUsed[0], memTotal[0], memUsed[1]));
updates.push(this.metricsService.createUtilizationMetric('Free memory', memFree[0], memTotal[0], memFree[1]));
updates.push(this.metricsService.createUtilizationMetric('File descriptors used', metrics.OpenFileDescriptorCount, metrics.MaxFileDescriptorCount));
break;
case 'java.lang:type=ClassLoading':
Expand Down

0 comments on commit 6e5380b

Please sign in to comment.