Skip to content

Commit

Permalink
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 Feb 22, 2024
1 parent ad8ca18 commit bc6ec52
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 21 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', memFree[0], memTotal[0], memFree[1]));
updates.push(this.metricsService.createUtilizationMetric('Memory used', memUsed[0], memTotal[0], memUsed[1]));
updates.push(this.metricsService.createUtilizationMetric('File descriptors used', metrics.OpenFileDescriptorCount, metrics.MaxFileDescriptorCount));
break;
case 'java.lang:type=ClassLoading':
Expand Down
45 changes: 26 additions & 19 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1332,10 +1332,10 @@ content-disposition@0.5.3:
dependencies:
safe-buffer "5.1.2"

content-type@~1.0.2, content-type@~1.0.4:
version "1.0.4"
resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b"
integrity sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==
content-type@~1.0.2, content-type@~1.0.4, content-type@~1.0.5:
version "1.0.5"
resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.5.tgz#8b773162656d1d1086784c8f23a54ce6d73d7918"
integrity sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==

continuable-cache@^0.3.1:
version "0.3.1"
Expand Down Expand Up @@ -2290,10 +2290,10 @@ ftp@~0.3.10:
readable-stream "1.1.x"
xregexp "2.0.0"

function-bind@^1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d"
integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==
function-bind@^1.1.1, function-bind@^1.1.2:
version "1.1.2"
resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.2.tgz#2c02d864d97f3ea6c8830c464cbd11ab6eab7a1c"
integrity sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==

gauge@~2.7.3:
version "2.7.4"
Expand Down Expand Up @@ -2764,6 +2764,13 @@ hash-base@3.0.4:
inherits "^2.0.1"
safe-buffer "^5.0.1"

hasown@^2.0.0:
version "2.0.1"
resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.1.tgz#26f48f039de2c0f8d3356c223fb8d50253519faa"
integrity sha512-1/th4MHjnwncwXsIW6QMzlvYL9kG5e/CpVvLRZe4XPa8TOUNbCELqmvhDmnkNsAjwaG4+I8gJJL0JBvTTLO9qA==
dependencies:
function-bind "^1.1.2"

hawk@6.0.2, hawk@~3.1.3, hawk@~6.0.2:
version "6.0.2"
resolved "https://registry.yarnpkg.com/hawk/-/hawk-6.0.2.tgz#af4d914eb065f9b5ce4d9d11c1cb2126eecc3038"
Expand Down Expand Up @@ -2958,7 +2965,7 @@ is-absolute@^1.0.0:
is-relative "^1.0.0"
is-windows "^1.0.1"

is-accessor-descriptor@1.0.0, is-accessor-descriptor@^0.1.6, is-accessor-descriptor@^1.0.0:
is-accessor-descriptor@1.0.0, is-accessor-descriptor@^1.0.0, is-accessor-descriptor@^1.0.1:
version "1.0.0"
resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz#169c2f6d3df1f992618072365c9b0ea1f6878656"
integrity sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==
Expand All @@ -2982,14 +2989,14 @@ is-buffer@^1.1.5:
resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be"
integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==

is-core-module@^2.9.0:
version "2.9.0"
resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.9.0.tgz#e1c34429cd51c6dd9e09e0799e396e27b19a9c69"
integrity sha512-+5FPy5PnwmO3lvfMb0AsoPaBG+5KHUI0wYFXOtYPnVVVspTFUuMZNfNaNVRt3FZadstu2c8x23vykRW/NBoU6A==
is-core-module@^2.13.0:
version "2.13.1"
resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.13.1.tgz#ad0d7532c6fea9da1ebdc82742d74525c6273384"
integrity sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==
dependencies:
has "^1.0.3"
hasown "^2.0.0"

is-data-descriptor@1.0.0, is-data-descriptor@^0.1.4, is-data-descriptor@^1.0.0:
is-data-descriptor@1.0.0, is-data-descriptor@^1.0.0, is-data-descriptor@^1.0.1:
version "1.0.0"
resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz#d84876321d0e7add03990406abbbbd36ba9268c7"
integrity sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==
Expand Down Expand Up @@ -3221,7 +3228,7 @@ jquery-ui-dist@1.12.1:
resolved "https://registry.yarnpkg.com/jquery-ui-dist/-/jquery-ui-dist-1.12.1.tgz#5c0815d3cc6f90ff5faaf5b268a6e23b4ca904fa"
integrity sha1-XAgV08xvkP9fqvWyaKbiO0ypBPo=

jquery@2.2.4, jquery@3.4.1, jquery@>=1.11.0, jquery@>=1.7, jquery@>=1.7.0, jquery@>=1.7.1, "jquery@>=1.7.1 <4.0.0", jquery@>=1.8, "jquery@^1.8.3 || ^2.0 || ^3.0", jquery@^3.4.1, jquery@~3.4.1:
jquery@2.2.4, jquery@3.4.1, jquery@>=1.11.0, jquery@>=1.7, jquery@>=1.7.0, jquery@>=1.7.1, jquery@>=1.8, "jquery@>=3.4.0 <4.0.0", "jquery@^1.8.3 || ^2.0 || ^3.0", jquery@^3.4.1, jquery@~3.4.1:
version "2.2.4"
resolved "https://registry.yarnpkg.com/jquery/-/jquery-2.2.4.tgz#2c89d6889b5eac522a7eea32c14521559c6cbf02"
integrity sha1-LInWiJterFIqfuoywUUhVZxsvwI=
Expand Down Expand Up @@ -3366,7 +3373,7 @@ karma@^2.0.0:
tmp "0.0.33"
useragent "2.2.1"

kind-of@3.2.2, kind-of@^1.1.0, kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.1.0, kind-of@^3.2.0, kind-of@^4.0.0, kind-of@^5.0.0, kind-of@^6.0.0, kind-of@^6.0.2:
kind-of@3.2.2, kind-of@^1.1.0, kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.1.0, kind-of@^3.2.0, kind-of@^4.0.0, kind-of@^6.0.0, kind-of@^6.0.2:
version "3.2.2"
resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64"
integrity sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=
Expand Down Expand Up @@ -4768,7 +4775,7 @@ qjobs@^1.1.4:
resolved "https://registry.yarnpkg.com/qjobs/-/qjobs-1.2.0.tgz#c45e9c61800bd087ef88d7e256423bdd49e5d071"
integrity sha512-8YOJEHtxpySA3fFDyCRxA+UUV+fA+rTWnuWvylOK/NCjhY+b4ocCtmu8TtsWb+mYeU+GCHf/S66KZF/AsteKHg==

qs@6.10.3, qs@6.4.0, qs@6.7.0, qs@^6.4.0, qs@~6.2.0, qs@~6.4.0, qs@~6.5.1, qs@~6.5.2:
qs@6.11.0, qs@6.4.0, qs@6.7.0, qs@^6.4.0, qs@~6.2.0, qs@~6.4.0, qs@~6.5.1, qs@~6.5.2:
version "6.4.0"
resolved "https://registry.yarnpkg.com/qs/-/qs-6.4.0.tgz#13e26d28ad6b0ffaa91312cd3bf708ed351e7233"
integrity sha1-E+JtKK1rD/qpExLNO/cI7TUecjM=
Expand All @@ -4787,7 +4794,7 @@ range-parser@1.2.0, range-parser@^1.2.0, range-parser@~1.2.0, range-parser@~1.2.
resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.0.tgz#f49be6b487894ddc40dcc94a322f611092e00d5e"
integrity sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4=

raw-body@2.2.0, raw-body@2.4.0, raw-body@2.5.1, raw-body@^2.2.0, raw-body@~1.1.0, raw-body@~2.2.0:
raw-body@2.2.0, raw-body@2.4.0, raw-body@2.5.2, raw-body@^2.2.0, raw-body@~1.1.0, raw-body@~2.2.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.2.0.tgz#994976cf6a5096a41162840492f0bdc5d6e7fb96"
integrity sha1-mUl2z2pQlqQRYoQEkvC9xdbn+5Y=
Expand Down

0 comments on commit bc6ec52

Please sign in to comment.