From 27e811979c6bd87a842c00150a4a7830ff1e7051 Mon Sep 17 00:00:00 2001 From: Carsten Grohmann Date: Thu, 9 Jan 2020 06:28:34 +0100 Subject: [PATCH] Add suffix "_pages" to process table items --- OOMAnalyser.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/OOMAnalyser.py b/OOMAnalyser.py index 76db5e6..336761a 100644 --- a/OOMAnalyser.py +++ b/OOMAnalyser.py @@ -343,8 +343,8 @@ class OOMAnalyser(object): re.MULTILINE) REC_PROCESS_LINE = re.compile( - r'^\[(?P[ \d]+)\]\s+(?P\d+)\s+(?P\d+)\s+(?P\d+)\s+(?P\d+)\s+(?P\d+)\s+' - r'(?P\d+)\s+(?P-?\d+)\s+(?P.+)\s*') + r'^\[(?P[ \d]+)\]\s+(?P\d+)\s+(?P\d+)\s+(?P\d+)\s+(?P\d+)\s+' + r'(?P\d+)\s+(?P\d+)\s+(?P-?\d+)\s+(?P.+)\s*') REC_OOM_KILL_PROCESS = re.compile( r'^Out of memory: Kill process (?P\d+) \((?P[\w ]+)\) ' @@ -593,7 +593,7 @@ class OOMAnalyser(object): for pid_str in ps.keys(): converted = {} process = ps[pid_str] - for item in ['uid', 'tgid', 'total_vm', 'rss', 'nr_ptes', 'swapents', 'oom_score_adj']: + for item in ['uid', 'tgid', 'total_vm_pages', 'rss_pages', 'nr_ptes_pages', 'swapents_pages', 'oom_score_adj']: try: converted[item] = int(process[item]) except: @@ -653,7 +653,7 @@ class OOMAnalyser(object): self.results['system_total_ramswap_kb'] = self.results['system_total_ram_kb'] + self.results['swap_total_kb'] total_rss_pages = 0 for pid in self.results['_processes'].keys(): - total_rss_pages += self.results['_processes'][pid]['rss'] + total_rss_pages += self.results['_processes'][pid]['rss_pages'] self.results['system_total_ram_used_kb'] = total_rss_pages * self.results['page_size_kb'] def _determinate_platform_and_distribution(self):