ambari icon indicating copy to clipboard operation
ambari copied to clipboard

[AMBARI-24463]Heatmaps:Calculation for Host Memory Used and Host CPU Wait IO is not correct

Open AaronWjf opened this issue 7 years ago • 3 comments

What changes were proposed in this pull request?

1.Host Memory Used calculation method : ((mem_total - mem_free - mem_cached)/mem_total)*100 The value of mem_free was collected by psutil.virtual_memory() method in host_info.py file and it correspond to 'available' in results returned by psutil.virtual_memory() .Actually,the available = free + buffers + cached.So,the Host Memory Used calculation method should be ((mem_total - mem_free)/mem_total)*100.

2.Host CPU Wait IO was collected by psutil.cpu_times_percent() method in host_info.py.It has been converted to percentage.So,we should use ${cpu_wio} instead of ${cpu_wio*100} as its value in widgets.json.

How was this patch tested?

Manually Tested.

AaronWjf avatar Aug 13 '18 11:08 AaronWjf

@avijayanhwx Could you help review this when you have time?

AaronWjf avatar Aug 13 '18 11:08 AaronWjf

Refer to this link for build results (access rights to CI server needed): https://builds.apache.org/job/Ambari-Github-PullRequest-Builder/3566/ Test PASSed.

asfgit avatar Aug 13 '18 12:08 asfgit

@d0zen1 @swagle Could you help review this when you have time?

AaronWjf avatar Aug 15 '18 06:08 AaronWjf