diff --git a/OOMAnalyser.html b/OOMAnalyser.html
index a5b149c..3eef03f 100644
--- a/OOMAnalyser.html
+++ b/OOMAnalyser.html
@@ -62,6 +62,10 @@
max-height: 200px;
}
+ .js-killed-proc-score--show {
+ /* empty - used to hide/show OOM score of killed process */
+ }
+
.js-oom-automatic--show {
/* empty - used to show sections for automatically triggered OOMs */
}
@@ -325,7 +329,10 @@ window.onerror = function (msg, url, lineNo, columnNo, error) {
OOM Score (score) |
|
Programs with the highest OOM score are terminated first. |
diff --git a/OOMAnalyser.py b/OOMAnalyser.py
index b3df2c7..19674c6 100644
--- a/OOMAnalyser.py
+++ b/OOMAnalyser.py
@@ -1772,6 +1772,13 @@ Out of memory: Killed process 651 (unattended-upgr) total-vm:108020kB, anon-rss:
continue
self._set_item(item)
+ # Hide "OOM Score" if not available
+ # since KernelConfig_5_0.EXTRACT_PATTERN_OVERLAY_50['Process killed by OOM']
+ if 'killed_proc_score' in self.oom_result.details:
+ show_elements('.js-killed-proc-score--show')
+ else:
+ hide_elements('.js-killed-proc-score--show')
+
# generate process table
self.update_process_table()
diff --git a/test.py b/test.py
index 34f49a3..12ca95f 100755
--- a/test.py
+++ b/test.py
@@ -213,6 +213,9 @@ class TestInBrowser(TestBase):
self.assertTrue('OOM killer was manually triggered' in explanation.text,
'Missing text "OOM killer was manually triggered"')
+ self.assertFalse('with an OOM score of' in explanation.text,
+ 'No OOM score but text "with an OOM score of"')
+
self.check_swap_inactive()
def check_swap_inactive(self):