Fix calculation of requested memory in kBytes

This commit is contained in:
Carsten Grohmann 2020-01-05 01:12:58 +01:00
parent cd00996583
commit fe3aed9815
2 changed files with 3 additions and 2 deletions

View File

@ -689,6 +689,7 @@ r'^Killed process \d+ \(.*\) total-vm:(?P<system_total_vm_kb>\d+)kB, anon-rss:(?
<ol>
<li>Add a textual summary of the analysis</li>
<li>Fix interpretation of the last OOM line</li>
<li>Fix calculation of requested memory in kBytes</li>
<li>...</li>
</ol>

View File

@ -606,8 +606,8 @@ class OOMAnalyser(object):
def _calc_trigger_process_values(self):
"""Calculate all values related with the trigger process"""
self.results['trigger_proc_requested_memory_pages'] = 2 ** self.results['trigger_proc_order']
self.results['trigger_proc_requested_memory_pages_kb'] = self.results['page_size']
self.results['trigger_proc_requested_memory_pages_kb'] = self.results['trigger_proc_requested_memory_pages'] *\
self.results['page_size']
# process gfp_mask
if self.results['trigger_proc_gfp_flags'] != '<not found>': # None has been is converted to '<not found>'
flags = self.results['trigger_proc_gfp_flags']