From e428a1c9f00cf867d62c8bc75f53d28061dc39ee Mon Sep 17 00:00:00 2001 From: Georg Pfuetzenreuter Date: Sun, 16 Apr 2023 16:21:58 +0200 Subject: [PATCH] Update Mem-Info/Part2 regex Update fields to match latest openSUSE output. Use spaces instead of new lines to match what a user would copy/paste from shell output. Signed-off-by: Georg Pfuetzenreuter --- OOMAnalyser.py | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/OOMAnalyser.py b/OOMAnalyser.py index 798405c..7c0bb3d 100644 --- a/OOMAnalyser.py +++ b/OOMAnalyser.py @@ -293,12 +293,13 @@ class BaseKernelConfig: True, ), "Overall Mem-Info (part 2)": ( - r"^ slab_reclaimable:(?P\d+) slab_unreclaimable:(?P\d+)" + r"slab_reclaimable:(?P\d+) slab_unreclaimable:(?P\d+)" r"(?:\n)" - r"^ mapped:(?P\d+) shmem:(?P\d+) pagetables:(?P\d+) " - r"bounce:(?P\d+)" + r" +mapped:(?P\d+) shmem:(?P\d+) pagetables:(?P\d+) bounce:(?P\d+)" r"(?:\n)" - r"^ free:(?P\d+) free_pcp:(?P\d+) free_cma:(?P\d+)", + r" +kernel_misc_reclaimable:(?P\d+)" + r"(?:\n)" + r" +free:(?P\d+) free_pcp:(?P\d+) free_cma:(?P\d+)", True, ), "Available memory chunks": ( @@ -2583,15 +2584,13 @@ class KernelConfig_6_1(KernelConfig_6_0): EXTRACT_PATTERN_OVERLAY_61 = { "Overall Mem-Info (part 2)": ( - r"^ slab_reclaimable:(?P\d+) slab_unreclaimable:(?P\d+)" + r" +slab_reclaimable:(?P\d+) slab_unreclaimable:(?P\d+)" r"(?:\n)" - r"^ mapped:(?P\d+) shmem:(?P\d+) pagetables:(?P\d+)" + r" +mapped:(?P\d+) shmem:(?P\d+) pagetables:(?P\d+) bounce:(?P\d+)" r"(?:\n)" - r"^ sec_pagetables:(?P\d+) bounce:(?P\d+)" + r" +kernel_misc_reclaimable:(?P\d+)" r"(?:\n)" - r"^ kernel_misc_reclaimable:(?P\d+)" - r"(?:\n)" - r"^ free:(?P\d+) free_pcp:(?P\d+) free_cma:(?P\d+)", + r" +free:(?P\d+) free_pcp:(?P\d+) free_cma:(?P\d+)", True, ), }