From 5b384a4d8f624ea4d0fd4b9e7435d8c3d9127556 Mon Sep 17 00:00:00 2001 From: Carsten Grohmann Date: Sat, 4 Jan 2020 14:25:41 +0100 Subject: [PATCH] Add a textual summary of the analysis --- OOMAnalyser.html | 49 ++++++++++++++++++++++++++++++++++++++++++++++++ OOMAnalyser.py | 28 +++++++++++++++++++++++++++ 2 files changed, 77 insertions(+) diff --git a/OOMAnalyser.html b/OOMAnalyser.html index 47c2b8b..a210dd0 100644 --- a/OOMAnalyser.html +++ b/OOMAnalyser.html @@ -22,6 +22,13 @@ content: " pages"; } + .text--append-suffix-percent { + text-align: right; + } + .text--append-suffix-percent::after { + content: "%"; + } + .text--align-right { text-align: right; } @@ -179,11 +186,52 @@ function goBack() {

Step 2 - Results

+

Go back to "Step 1 - Enter your OOM message" to run a new analysis.

+ +

Summary

+
+

+ The process "" (pid ) + requested + () memory. + + The system couldn't satisfy this request and started the OOM killer to free memory. The OOM killer + calculates a score for each process and terminates the process with the highest score. + + The it terminates "" (pid + ) to satisfy the initial memory request. +

+

+ The terminated process uses + () resident memory. + These values are the sum of resident anonymous memory (anon-rss) and resident file mapping memory + (file-rss). Resident shared memory + () is ignored in + this calculation. +

+ The system has + ( * + ) + physical memory and swap space. + That's total. +

+ +
+ +

Details of analysis

The result of the analysis is displayed in three columns. The first column is used to name the property including the original OOM identifier in brackets. The extracted information is displayed in the second column. @@ -651,6 +699,7 @@ function goBack() {

General

    +
  1. Add a textual summary of the analysis
  2. ...
diff --git a/OOMAnalyser.py b/OOMAnalyser.py index 8ba1db2..52c8546 100644 --- a/OOMAnalyser.py +++ b/OOMAnalyser.py @@ -1061,9 +1061,36 @@ Killed process 6576 (java) total-vm:33914892kB, anon-rss:20629004kB, file-rss:0k hide_element('input') show_element('analysis') + # copy entries for explanation section + for i in ('killed_proc_name', 'killed_proc_pid', 'killed_proc_shmem_rss_kb', 'page_size', 'ram_pages', + 'swap_total_kb', 'swap_used_kb', 'trigger_proc_name', 'trigger_proc_pid', + 'trigger_proc_requested_memory', 'trigger_proc_requested_memory_kbytes', + ): + self.oom_details['explain_'+i] = self.oom_details.get(i) + + # calculate remaining explanation values + self.oom_details['explain_ram_kb'] = self.oom_details['ram_pages'] * self.oom_details['page_size'] + + + self.oom_details['explain_killed_proc_rss_kb'] = self.oom_details['killed_proc_anon_rss_kb'] + \ + self.oom_details['killed_proc_file_rss_kb'] + self.oom_details['explain_killed_proc_rss_percent'] = int(100 * + self.oom_details['explain_killed_proc_rss_kb'] / + self.oom_details['explain_ram_kb']) + + self.oom_details['explain_total_memory_kb'] = self.oom_details['explain_ram_kb'] + \ + self.oom_details['swap_total_kb'] + + # self.oom_details['explain_used_memory_kb'] = 42 + # self.oom_details['explain_used_memory_percent'] = 42 + # self.oom_details['explain_swap_used_percent'] = int(100 * + # self.oom_details['swap_used_kb'] / + # self.oom_details['swap_total_kb']) + for item in self.oom_details.keys(): self._set_single_item(item) + # generate swap usage diagram svg_swap = self.svg_generate_bar_chart( ('Swap Used', self.oom_details['swap_used_kb']), ('Swap Free', self.oom_details['swap_free_kb']), @@ -1072,6 +1099,7 @@ Killed process 6576 (java) total-vm:33914892kB, anon-rss:20629004kB, file-rss:0k elem_svg_swap = document.getElementById('svg_swap') elem_svg_swap.appendChild(svg_swap) + # generate RAM usage diagram svg_ram = self.svg_generate_bar_chart( ('Active mem', self.oom_details['active_anon_pages']), ('Inactive mem', self.oom_details['inactive_anon_pages']),