ambari icon indicating copy to clipboard operation
ambari copied to clipboard

[AMBARI-25823] Fix the widget.json for the Host memory used %

Open Sushmasree-28 opened this issue 1 year ago • 3 comments

'Free' memory is the memory available after the cached memory getting reduced from total memory but the 'available' memory is the total available memory including the cached memory as that can be reclaimed anytime. So mem_free is nothing but mem_available.

What changes were proposed in this pull request?

In the host memory used heat map we should just do (mem_total-mem_free)/mem_total to get the used memory fraction.

How was this patch tested?

(Please explain how this patch was tested. Ex: unit tests, manual tests) (If this patch involves UI changes, please attach a screen-shot; otherwise, remove this)

Please review Ambari Contributing Guide before opening a pull request.

Sushmasree-28 avatar Dec 28 '22 03:12 Sushmasree-28

Screenshot from 2023-01-05 23-14-10 My grafana dashboard also doesn't consider the catched memory.

vivostar avatar Jan 05 '23 15:01 vivostar

+1

vivostar avatar Jan 05 '23 15:01 vivostar

Thanks for the PR @Sushmasree-28 , may I ask whether we have used the variable "mem_free" incorrectly in all places, or only here? Can we define a new variable "mem_available" and use it?

kevinw66 avatar Jan 05 '23 15:01 kevinw66