From e1d71014d4d03cf8f092d6b765996ef28349f93b Mon Sep 17 00:00:00 2001 From: Guillaume Raffy Date: Wed, 14 Aug 2024 18:34:44 +0200 Subject: [PATCH] refactored Sums into a class in sumfinder (much cleaner) and added method to output Sums to stdout --- measurements/expe003/readme.md | 184 ++++++++++++++++++++++++++++++++- src/expe003.py | 18 ++-- src/sumfinder/__init__.py | 2 - src/sumfinder/sumfinder.py | 116 ++++++++++++--------- 4 files changed, 259 insertions(+), 61 deletions(-) diff --git a/measurements/expe003/readme.md b/measurements/expe003/readme.md index da1f6ca..bdda096 100644 --- a/measurements/expe003/readme.md +++ b/measurements/expe003/readme.md @@ -224,12 +224,190 @@ HardwareCorrupted: 52 kB In order to remove the concidences in the sums found ```sh +20240814-18:22:58 graffy@graffy-ws2:~/work/linuxram.git/measurements/expe003$ ../../src/expe003.py starting sums (90 sums): -[{'total': 'MemTotal', 'components': ['Active(file)', 'AnonHugePages', 'Active(anon)', 'Inactive(anon)', 'Dirty', 'DirectMap2M', 'Slab', 'SReclaimable', 'SwapCached', 'MemFree', 'SUnreclaim', 'VmallocUsed', 'PageTables', 'Percpu', 'Mapped', 'Buffers', 'Mlocked', 'Writeback', 'Hugepagesize', 'HardwareCorrupted']}, {'total': 'MemTotal', 'components': ['Active(file)', 'AnonHugePages', 'Active(anon)', 'Inactive(anon)', 'Dirty', 'DirectMap2M', 'Slab', 'SReclaimable', 'SwapCached', 'MemFree', 'SUnreclaim', 'DirectMap4k', 'VmallocUsed', 'Unevictable', 'Mlocked', 'KernelStack']}, {'total': 'MemTotal', 'components': ['Active(file)', 'AnonHugePages', 'Active(anon)', 'Inactive(anon)', 'Dirty', 'DirectMap2M', 'Slab', 'KReclaimable', 'SwapCached', 'MemFree', 'SUnreclaim', 'VmallocUsed', 'PageTables', 'Percpu', 'Mapped', 'Buffers', 'Mlocked', 'Writeback', 'Hugepagesize', 'HardwareCorrupted']}, {'total': 'MemTotal', 'components': ['Active(file)', 'AnonHugePages', 'Active(anon)', 'Inactive(anon)', 'Dirty', 'DirectMap2M', 'Slab', 'KReclaimable', 'SwapCached', 'MemFree', 'SUnreclaim', 'DirectMap4k', 'VmallocUsed', 'Unevictable', 'Mlocked', 'KernelStack']}, {'total': 'MemTotal', 'components': ['Inactive(file)', 'Active(file)', 'Active(anon)', 'Inactive(anon)', 'SReclaimable', 'SwapCached', 'SUnreclaim', 'DirectMap4k', 'Buffers', 'Unevictable', 'Mlocked', 'KernelStack', 'Writeback', 'HardwareCorrupted']}, {'total': 'MemTotal', 'components': ['Inactive(file)', 'Active(file)', 'Active(anon)', 'Inactive(anon)', 'KReclaimable', 'SwapCached', 'SUnreclaim', 'DirectMap4k', 'Buffers', 'Unevictable', 'Mlocked', 'KernelStack', 'Writeback', 'HardwareCorrupted']}, {'total': 'MemTotal', 'components': ['Inactive(file)', 'Active(file)', 'Active(anon)', 'Inactive(anon)', 'Slab', 'SwapCached', 'DirectMap4k', 'Buffers', 'Unevictable', 'Mlocked', 'KernelStack', 'Writeback', 'HardwareCorrupted']}, {'total': 'MemTotal', 'components': ['Inactive', 'Active(file)', 'Active(anon)', 'SReclaimable', 'SwapCached', 'SUnreclaim', 'DirectMap4k', 'Buffers', 'Unevictable', 'Mlocked', 'KernelStack', 'Writeback', 'HardwareCorrupted']}, {'total': 'MemTotal', 'components': ['Inactive', 'Active(file)', 'Active(anon)', 'KReclaimable', 'SwapCached', 'SUnreclaim', 'DirectMap4k', 'Buffers', 'Unevictable', 'Mlocked', 'KernelStack', 'Writeback', 'HardwareCorrupted']}, {'total': 'MemTotal', 'components': ['Inactive', 'Active(file)', 'Active(anon)', 'Slab', 'SwapCached', 'DirectMap4k', 'Buffers', 'Unevictable', 'Mlocked', 'KernelStack', 'Writeback', 'HardwareCorrupted']}, {'total': 'MemTotal', 'components': ['Active', 'AnonHugePages', 'Inactive(anon)', 'Dirty', 'DirectMap2M', 'Slab', 'SReclaimable', 'SwapCached', 'MemFree', 'SUnreclaim', 'VmallocUsed', 'PageTables', 'Percpu', 'Mapped', 'Buffers', 'Mlocked', 'Writeback', 'Hugepagesize', 'HardwareCorrupted']}, {'total': 'MemTotal', 'components': ['Active', 'AnonHugePages', 'Inactive(anon)', 'Dirty', 'DirectMap2M', 'Slab', 'SReclaimable', 'SwapCached', 'MemFree', 'SUnreclaim', 'DirectMap4k', 'VmallocUsed', 'Unevictable', 'Mlocked', 'KernelStack']}, {'total': 'MemTotal', 'components': ['Active', 'AnonHugePages', 'Inactive(anon)', 'Dirty', 'DirectMap2M', 'Slab', 'KReclaimable', 'SwapCached', 'MemFree', 'SUnreclaim', 'VmallocUsed', 'PageTables', 'Percpu', 'Mapped', 'Buffers', 'Mlocked', 'Writeback', 'Hugepagesize', 'HardwareCorrupted']}, {'total': 'MemTotal', 'components': ['Active', 'AnonHugePages', 'Inactive(anon)', 'Dirty', 'DirectMap2M', 'Slab', 'KReclaimable', 'SwapCached', 'MemFree', 'SUnreclaim', 'DirectMap4k', 'VmallocUsed', 'Unevictable', 'Mlocked', 'KernelStack']}, {'total': 'MemTotal', 'components': ['Active', 'AnonHugePages', 'Active(anon)', 'DirectMap2M', 'SReclaimable', 'DirectMap4k', 'VmallocUsed', 'Percpu', 'Mapped', 'Shmem', 'Buffers', 'Mlocked', 'KernelStack', 'Hugepagesize', 'HardwareCorrupted']}, {'total': 'MemTotal', 'components': ['Active', 'AnonHugePages', 'Active(anon)', 'DirectMap2M', 'KReclaimable', 'DirectMap4k', 'VmallocUsed', 'Percpu', 'Mapped', 'Shmem', 'Buffers', 'Mlocked', 'KernelStack', 'Hugepagesize', 'HardwareCorrupted']}, {'total': 'MemTotal', 'components': ['Active', 'Inactive(file)', 'Inactive(anon)', 'SReclaimable', 'SwapCached', 'SUnreclaim', 'DirectMap4k', 'Buffers', 'Unevictable', 'Mlocked', 'KernelStack', 'Writeback', 'HardwareCorrupted']}, {'total': 'MemTotal', 'components': ['Active', 'Inactive(file)', 'Inactive(anon)', 'KReclaimable', 'SwapCached', 'SUnreclaim', 'DirectMap4k', 'Buffers', 'Unevictable', 'Mlocked', 'KernelStack', 'Writeback', 'HardwareCorrupted']}, {'total': 'MemTotal', 'components': ['Active', 'Inactive(file)', 'Inactive(anon)', 'Slab', 'SwapCached', 'DirectMap4k', 'Buffers', 'Unevictable', 'Mlocked', 'KernelStack', 'Writeback', 'HardwareCorrupted']}, {'total': 'MemTotal', 'components': ['Active', 'Inactive', 'SReclaimable', 'SwapCached', 'SUnreclaim', 'DirectMap4k', 'Buffers', 'Unevictable', 'Mlocked', 'KernelStack', 'Writeback', 'HardwareCorrupted']}, {'total': 'MemTotal', 'components': ['Active', 'Inactive', 'KReclaimable', 'SwapCached', 'SUnreclaim', 'DirectMap4k', 'Buffers', 'Unevictable', 'Mlocked', 'KernelStack', 'Writeback', 'HardwareCorrupted']}, {'total': 'MemTotal', 'components': ['Active', 'Inactive', 'Slab', 'SwapCached', 'DirectMap4k', 'Buffers', 'Unevictable', 'Mlocked', 'KernelStack', 'Writeback', 'HardwareCorrupted']}, {'total': 'MemTotal', 'components': ['Cached', 'SwapTotal', 'Inactive(anon)', 'DirectMap2M', 'SReclaimable', 'SwapCached', 'MemFree', 'DirectMap4k', 'PageTables', 'Percpu', 'KernelStack', 'Writeback', 'HardwareCorrupted']}, {'total': 'MemTotal', 'components': ['Cached', 'SwapTotal', 'Inactive(anon)', 'DirectMap2M', 'KReclaimable', 'SwapCached', 'MemFree', 'DirectMap4k', 'PageTables', 'Percpu', 'KernelStack', 'Writeback', 'HardwareCorrupted']}, {'total': 'MemTotal', 'components': ['Cached', 'SwapTotal', 'Inactive(anon)', 'Dirty', 'SwapCached', 'SUnreclaim', 'Percpu', 'HardwareCorrupted']}, {'total': 'MemTotal', 'components': ['Cached', 'Active(anon)', 'Inactive(anon)', 'SReclaimable', 'SwapCached', 'SUnreclaim', 'PageTables', 'Percpu', 'Mapped', 'Buffers', 'KernelStack', 'HardwareCorrupted']}, {'total': 'MemTotal', 'components': ['Cached', 'Active(anon)', 'Inactive(anon)', 'KReclaimable', 'SwapCached', 'SUnreclaim', 'PageTables', 'Percpu', 'Mapped', 'Buffers', 'KernelStack', 'HardwareCorrupted']}, {'total': 'MemTotal', 'components': ['Cached', 'Active(anon)', 'Inactive(anon)', 'Slab', 'SwapCached', 'PageTables', 'Percpu', 'Mapped', 'Buffers', 'KernelStack', 'HardwareCorrupted']}, {'total': 'MemTotal', 'components': ['MemAvailable', 'SwapTotal', 'Inactive(anon)', 'DirectMap2M', 'KReclaimable', 'SReclaimable', 'SwapCached', 'Buffers', 'Hugepagesize']}, {'total': 'MemTotal', 'components': ['CommitLimit', 'Active(anon)', 'Inactive(anon)', 'SUnreclaim', 'VmallocUsed', 'Mapped', 'Shmem', 'KernelStack', 'Hugepagesize', 'HardwareCorrupted']}, {'total': 'DirectMap1G', 'components': ['AnonPages', 'Active(file)', 'AnonHugePages', 'Dirty', 'DirectMap2M', 'Slab', 'KReclaimable', 'SReclaimable', 'MemFree', 'DirectMap4k', 'VmallocUsed', 'Mapped', 'Shmem', 'Buffers', 'Unevictable', 'Mlocked', 'KernelStack', 'Hugepagesize', 'HardwareCorrupted']}, {'total': 'DirectMap1G', 'components': ['Inactive(file)', 'Active(file)', 'SwapTotal', 'Inactive(anon)', 'DirectMap2M', 'SReclaimable', 'SUnreclaim', 'VmallocUsed', 'Percpu', 'Mapped', 'Shmem', 'Writeback', 'HardwareCorrupted']}, {'total': 'DirectMap1G', 'components': ['Inactive(file)', 'Active(file)', 'SwapTotal', 'Inactive(anon)', 'DirectMap2M', 'KReclaimable', 'SUnreclaim', 'VmallocUsed', 'Percpu', 'Mapped', 'Shmem', 'Writeback', 'HardwareCorrupted']}, {'total': 'DirectMap1G', 'components': ['Inactive(file)', 'Active(file)', 'SwapTotal', 'Inactive(anon)', 'DirectMap2M', 'Slab', 'VmallocUsed', 'Percpu', 'Mapped', 'Shmem', 'Writeback', 'HardwareCorrupted']}, {'total': 'DirectMap1G', 'components': ['Inactive(file)', 'Active(file)', 'Active(anon)', 'Inactive(anon)', 'SReclaimable', 'DirectMap4k', 'VmallocUsed', 'Shmem', 'Buffers', 'KernelStack', 'Writeback']}, {'total': 'DirectMap1G', 'components': ['Inactive(file)', 'Active(file)', 'Active(anon)', 'Inactive(anon)', 'KReclaimable', 'DirectMap4k', 'VmallocUsed', 'Shmem', 'Buffers', 'KernelStack', 'Writeback']}, {'total': 'DirectMap1G', 'components': ['Inactive', 'Active(file)', 'SwapTotal', 'DirectMap2M', 'SReclaimable', 'SUnreclaim', 'VmallocUsed', 'Percpu', 'Mapped', 'Shmem', 'Writeback', 'HardwareCorrupted']}, {'total': 'DirectMap1G', 'components': ['Inactive', 'Active(file)', 'SwapTotal', 'DirectMap2M', 'KReclaimable', 'SUnreclaim', 'VmallocUsed', 'Percpu', 'Mapped', 'Shmem', 'Writeback', 'HardwareCorrupted']}, {'total': 'DirectMap1G', 'components': ['Inactive', 'Active(file)', 'SwapTotal', 'DirectMap2M', 'Slab', 'VmallocUsed', 'Percpu', 'Mapped', 'Shmem', 'Writeback', 'HardwareCorrupted']}, {'total': 'DirectMap1G', 'components': ['Inactive', 'Active(file)', 'Active(anon)', 'SReclaimable', 'DirectMap4k', 'VmallocUsed', 'Shmem', 'Buffers', 'KernelStack', 'Writeback']}, {'total': 'DirectMap1G', 'components': ['Inactive', 'Active(file)', 'Active(anon)', 'KReclaimable', 'DirectMap4k', 'VmallocUsed', 'Shmem', 'Buffers', 'KernelStack', 'Writeback']}, {'total': 'DirectMap1G', 'components': ['Active', 'Active(file)', 'Inactive(anon)', 'KReclaimable', 'SReclaimable', 'SwapCached', 'MemFree', 'SUnreclaim', 'DirectMap4k', 'Mapped', 'Unevictable', 'KernelStack', 'Writeback', 'Hugepagesize', 'HardwareCorrupted']}, {'total': 'DirectMap1G', 'components': ['Active', 'Active(file)', 'Inactive(anon)', 'Slab', 'SReclaimable', 'SwapCached', 'MemFree', 'DirectMap4k', 'Mapped', 'Unevictable', 'KernelStack', 'Writeback', 'Hugepagesize', 'HardwareCorrupted']}, {'total': 'DirectMap1G', 'components': ['Active', 'Active(file)', 'Inactive(anon)', 'Slab', 'KReclaimable', 'SwapCached', 'MemFree', 'DirectMap4k', 'Mapped', 'Unevictable', 'KernelStack', 'Writeback', 'Hugepagesize', 'HardwareCorrupted']}, {'total': 'DirectMap1G', 'components': ['Active', 'Inactive(file)', 'Inactive(anon)', 'SReclaimable', 'DirectMap4k', 'VmallocUsed', 'Shmem', 'Buffers', 'KernelStack', 'Writeback']}, {'total': 'DirectMap1G', 'components': ['Active', 'Inactive(file)', 'Inactive(anon)', 'KReclaimable', 'DirectMap4k', 'VmallocUsed', 'Shmem', 'Buffers', 'KernelStack', 'Writeback']}, {'total': 'DirectMap1G', 'components': ['Active', 'Inactive', 'SReclaimable', 'DirectMap4k', 'VmallocUsed', 'Shmem', 'Buffers', 'KernelStack', 'Writeback']}, {'total': 'DirectMap1G', 'components': ['Active', 'Inactive', 'KReclaimable', 'DirectMap4k', 'VmallocUsed', 'Shmem', 'Buffers', 'KernelStack', 'Writeback']}, {'total': 'DirectMap1G', 'components': ['Cached', 'AnonHugePages', 'Dirty', 'DirectMap2M', 'KReclaimable', 'SReclaimable', 'SUnreclaim', 'DirectMap4k', 'VmallocUsed', 'PageTables', 'Percpu', 'Unevictable', 'KernelStack', 'Hugepagesize', 'HardwareCorrupted']}, {'total': 'DirectMap1G', 'components': ['Cached', 'AnonHugePages', 'Dirty', 'DirectMap2M', 'Slab', 'SReclaimable', 'DirectMap4k', 'VmallocUsed', 'PageTables', 'Percpu', 'Unevictable', 'KernelStack', 'Hugepagesize', 'HardwareCorrupted']}, {'total': 'DirectMap1G', 'components': ['Cached', 'AnonHugePages', 'Dirty', 'DirectMap2M', 'Slab', 'KReclaimable', 'DirectMap4k', 'VmallocUsed', 'PageTables', 'Percpu', 'Unevictable', 'KernelStack', 'Hugepagesize', 'HardwareCorrupted']}, {'total': 'DirectMap1G', 'components': ['Cached', 'Active(file)', 'KReclaimable', 'SReclaimable', 'MemFree', 'SUnreclaim', 'DirectMap4k', 'PageTables', 'Percpu', 'Shmem', 'Mlocked', 'KernelStack', 'HardwareCorrupted']}, {'total': 'DirectMap1G', 'components': ['Cached', 'Active(file)', 'Slab', 'SReclaimable', 'MemFree', 'DirectMap4k', 'PageTables', 'Percpu', 'Shmem', 'Mlocked', 'KernelStack', 'HardwareCorrupted']}, {'total': 'DirectMap1G', 'components': ['Cached', 'Active(file)', 'Slab', 'KReclaimable', 'MemFree', 'DirectMap4k', 'PageTables', 'Percpu', 'Shmem', 'Mlocked', 'KernelStack', 'HardwareCorrupted']}, {'total': 'DirectMap1G', 'components': ['Cached', 'Inactive(file)', 'SwapCached', 'VmallocUsed', 'Shmem', 'Buffers', 'KernelStack', 'Writeback', 'Hugepagesize']}, {'total': 'DirectMap1G', 'components': ['MemAvailable', 'AnonPages', 'SReclaimable', 'SwapCached', 'VmallocUsed', 'Mapped', 'Mlocked', 'KernelStack', 'Writeback', 'HardwareCorrupted']}, {'total': 'DirectMap1G', 'components': ['MemAvailable', 'AnonPages', 'KReclaimable', 'SwapCached', 'VmallocUsed', 'Mapped', 'Mlocked', 'KernelStack', 'Writeback', 'HardwareCorrupted']}, {'total': 'Committed_AS', 'components': ['AnonHugePages', 'Active(anon)', 'SwapTotal', 'Dirty', 'DirectMap2M', 'Slab', 'MemFree', 'SUnreclaim', 'DirectMap4k', 'VmallocUsed', 'PageTables', 'Percpu', 'Mapped', 'Unevictable', 'Mlocked', 'Writeback', 'Hugepagesize']}, {'total': 'Committed_AS', 'components': ['Active(file)', 'SwapTotal', 'Inactive(anon)', 'Dirty', 'DirectMap2M', 'SReclaimable', 'MemFree', 'DirectMap4k', 'PageTables', 'Percpu', 'Mapped', 'Shmem', 'Buffers', 'Unevictable', 'Mlocked', 'KernelStack', 'Writeback', 'HardwareCorrupted']}, {'total': 'Committed_AS', 'components': ['Active(file)', 'SwapTotal', 'Inactive(anon)', 'Dirty', 'DirectMap2M', 'KReclaimable', 'MemFree', 'DirectMap4k', 'PageTables', 'Percpu', 'Mapped', 'Shmem', 'Buffers', 'Unevictable', 'Mlocked', 'KernelStack', 'Writeback', 'HardwareCorrupted']}, {'total': 'Committed_AS', 'components': ['AnonPages', 'SwapTotal', 'Inactive(anon)', 'Dirty', 'DirectMap2M', 'SUnreclaim', 'VmallocUsed', 'Percpu', 'Mapped', 'Shmem', 'Buffers', 'Mlocked', 'KernelStack', 'Writeback', 'Hugepagesize', 'HardwareCorrupted']}, {'total': 'Committed_AS', 'components': ['Inactive(file)', 'SwapTotal', 'Inactive(anon)', 'Dirty', 'Slab', 'KReclaimable', 'SReclaimable', 'SUnreclaim', 'DirectMap4k', 'PageTables', 'Shmem', 'Unevictable', 'Mlocked', 'KernelStack', 'Hugepagesize']}, {'total': 'Committed_AS', 'components': ['Inactive', 'Inactive(anon)', 'Dirty', 'DirectMap2M', 'Slab', 'SwapCached', 'MemFree', 'SUnreclaim', 'VmallocUsed', 'PageTables', 'Percpu', 'Mapped', 'Buffers', 'Unevictable', 'Mlocked', 'HardwareCorrupted']}, {'total': 'Committed_AS', 'components': ['Inactive', 'SwapTotal', 'Dirty', 'Slab', 'KReclaimable', 'SReclaimable', 'SUnreclaim', 'DirectMap4k', 'PageTables', 'Shmem', 'Unevictable', 'Mlocked', 'KernelStack', 'Hugepagesize']}, {'total': 'Committed_AS', 'components': ['Cached', 'DirectMap2M', 'Slab', 'MemFree', 'SUnreclaim', 'DirectMap4k', 'Shmem', 'Buffers', 'Unevictable', 'Mlocked', 'KernelStack', 'Writeback', 'Hugepagesize', 'HardwareCorrupted']}, {'total': 'Committed_AS', 'components': ['CommitLimit', 'DirectMap2M', 'SwapCached', 'VmallocUsed', 'Percpu', 'Mapped', 'Shmem', 'Mlocked', 'Writeback', 'Hugepagesize']}, {'total': 'CommitLimit', 'components': ['AnonHugePages', 'Active(anon)', 'SwapTotal', 'Dirty', 'SwapCached', 'MemFree', 'DirectMap4k', 'VmallocUsed', 'Percpu', 'Mapped', 'Shmem', 'KernelStack']}, {'total': 'CommitLimit', 'components': ['Active(file)', 'AnonHugePages', 'Dirty', 'DirectMap2M', 'Slab', 'SwapCached', 'MemFree', 'SUnreclaim', 'DirectMap4k', 'PageTables', 'Mapped', 'KernelStack', 'Writeback', 'Hugepagesize']}, {'total': 'CommitLimit', 'components': ['Inactive(file)', 'SwapTotal', 'Inactive(anon)', 'Slab', 'KReclaimable', 'SReclaimable', 'SwapCached', 'DirectMap4k', 'Percpu', 'Buffers', 'Mlocked', 'KernelStack', 'Writeback']}, {'total': 'CommitLimit', 'components': ['Inactive', 'SwapTotal', 'Slab', 'KReclaimable', 'SReclaimable', 'SwapCached', 'DirectMap4k', 'Percpu', 'Buffers', 'Mlocked', 'KernelStack', 'Writeback']}, {'total': 'CommitLimit', 'components': ['Cached', 'SwapCached', 'MemFree', 'VmallocUsed', 'Mapped', 'Shmem', 'Unevictable', 'Mlocked', 'Writeback', 'HardwareCorrupted']}, {'total': 'MemAvailable', 'components': ['AnonPages', 'AnonHugePages', 'Dirty', 'DirectMap2M', 'MemFree', 'DirectMap4k', 'VmallocUsed', 'Mapped', 'Unevictable', 'KernelStack', 'Writeback', 'HardwareCorrupted']}, {'total': 'MemAvailable', 'components': ['Inactive(file)', 'SwapTotal', 'Inactive(anon)', 'SReclaimable', 'SwapCached', 'MemFree', 'SUnreclaim', 'VmallocUsed', 'Percpu', 'Mapped', 'Hugepagesize', 'HardwareCorrupted']}, {'total': 'MemAvailable', 'components': ['Inactive(file)', 'SwapTotal', 'Inactive(anon)', 'KReclaimable', 'SwapCached', 'MemFree', 'SUnreclaim', 'VmallocUsed', 'Percpu', 'Mapped', 'Hugepagesize', 'HardwareCorrupted']}, {'total': 'MemAvailable', 'components': ['Inactive(file)', 'SwapTotal', 'Inactive(anon)', 'Slab', 'SwapCached', 'MemFree', 'VmallocUsed', 'Percpu', 'Mapped', 'Hugepagesize', 'HardwareCorrupted']}, {'total': 'MemAvailable', 'components': ['Inactive(file)', 'Active(file)', 'PageTables', 'Percpu', 'Shmem', 'Buffers', 'Mlocked', 'KernelStack', 'Hugepagesize']}, {'total': 'MemAvailable', 'components': ['Inactive', 'SwapTotal', 'SReclaimable', 'SwapCached', 'MemFree', 'SUnreclaim', 'VmallocUsed', 'Percpu', 'Mapped', 'Hugepagesize', 'HardwareCorrupted']}, {'total': 'MemAvailable', 'components': ['Inactive', 'SwapTotal', 'KReclaimable', 'SwapCached', 'MemFree', 'SUnreclaim', 'VmallocUsed', 'Percpu', 'Mapped', 'Hugepagesize', 'HardwareCorrupted']}, {'total': 'MemAvailable', 'components': ['Inactive', 'SwapTotal', 'Slab', 'SwapCached', 'MemFree', 'VmallocUsed', 'Percpu', 'Mapped', 'Hugepagesize', 'HardwareCorrupted']}, {'total': 'Cached', 'components': ['AnonPages', 'SwapTotal', 'Inactive(anon)', 'Slab', 'SwapCached', 'MemFree', 'SUnreclaim', 'DirectMap4k', 'VmallocUsed', 'Percpu', 'Shmem', 'Buffers', 'KernelStack']}, {'total': 'Cached', 'components': ['AnonPages', 'AnonHugePages', 'Dirty', 'DirectMap2M', 'SUnreclaim', 'VmallocUsed', 'Percpu', 'Mlocked', 'KernelStack', 'Writeback', 'HardwareCorrupted']}, {'total': 'Active', 'components': ['Active(anon)', 'SwapTotal', 'Inactive(anon)', 'SwapCached', 'MemFree', 'SUnreclaim', 'DirectMap4k', 'VmallocUsed', 'PageTables', 'Percpu', 'Mlocked', 'Writeback', 'Hugepagesize']}, {'total': 'Active', 'components': ['Active(file)', 'Active(anon)']}, {'total': 'Inactive', 'components': ['AnonHugePages', 'Inactive(anon)', 'Dirty', 'DirectMap2M', 'Slab', 'SUnreclaim', 'PageTables', 'Shmem', 'Unevictable', 'KernelStack']}, {'total': 'Inactive', 'components': ['Inactive(file)', 'Inactive(anon)']}, {'total': 'Inactive(file)', 'components': ['AnonHugePages', 'Dirty', 'DirectMap2M', 'Slab', 'SUnreclaim', 'PageTables', 'Shmem', 'Unevictable', 'KernelStack']}, {'total': 'Active(file)', 'components': ['SwapTotal', 'Inactive(anon)', 'SwapCached', 'MemFree', 'SUnreclaim', 'DirectMap4k', 'VmallocUsed', 'PageTables', 'Percpu', 'Mlocked', 'Writeback', 'Hugepagesize']}, {'total': 'Slab', 'components': ['SReclaimable', 'SUnreclaim']}, {'total': 'Slab', 'components': ['KReclaimable', 'SUnreclaim']}, {'total': 'KReclaimable', 'components': ['SReclaimable']}] +0: MemTotal = Active(file) + AnonHugePages + Active(anon) + Inactive(anon) + Dirty + DirectMap2M + Slab + SReclaimable + SwapCached + MemFree + SUnreclaim + VmallocUsed + PageTables + Percpu + Mapped + Buffers + Mlocked + Writeback + Hugepagesize + HardwareCorrupted +1: MemTotal = Active(file) + AnonHugePages + Active(anon) + Inactive(anon) + Dirty + DirectMap2M + Slab + SReclaimable + SwapCached + MemFree + SUnreclaim + DirectMap4k + VmallocUsed + Unevictable + Mlocked + KernelStack +2: MemTotal = Active(file) + AnonHugePages + Active(anon) + Inactive(anon) + Dirty + DirectMap2M + Slab + KReclaimable + SwapCached + MemFree + SUnreclaim + VmallocUsed + PageTables + Percpu + Mapped + Buffers + Mlocked + Writeback + Hugepagesize + HardwareCorrupted +3: MemTotal = Active(file) + AnonHugePages + Active(anon) + Inactive(anon) + Dirty + DirectMap2M + Slab + KReclaimable + SwapCached + MemFree + SUnreclaim + DirectMap4k + VmallocUsed + Unevictable + Mlocked + KernelStack +4: MemTotal = Inactive(file) + Active(file) + Active(anon) + Inactive(anon) + SReclaimable + SwapCached + SUnreclaim + DirectMap4k + Buffers + Unevictable + Mlocked + KernelStack + Writeback + HardwareCorrupted +5: MemTotal = Inactive(file) + Active(file) + Active(anon) + Inactive(anon) + KReclaimable + SwapCached + SUnreclaim + DirectMap4k + Buffers + Unevictable + Mlocked + KernelStack + Writeback + HardwareCorrupted +6: MemTotal = Inactive(file) + Active(file) + Active(anon) + Inactive(anon) + Slab + SwapCached + DirectMap4k + Buffers + Unevictable + Mlocked + KernelStack + Writeback + HardwareCorrupted +7: MemTotal = Inactive + Active(file) + Active(anon) + SReclaimable + SwapCached + SUnreclaim + DirectMap4k + Buffers + Unevictable + Mlocked + KernelStack + Writeback + HardwareCorrupted +8: MemTotal = Inactive + Active(file) + Active(anon) + KReclaimable + SwapCached + SUnreclaim + DirectMap4k + Buffers + Unevictable + Mlocked + KernelStack + Writeback + HardwareCorrupted +9: MemTotal = Inactive + Active(file) + Active(anon) + Slab + SwapCached + DirectMap4k + Buffers + Unevictable + Mlocked + KernelStack + Writeback + HardwareCorrupted +10: MemTotal = Active + AnonHugePages + Inactive(anon) + Dirty + DirectMap2M + Slab + SReclaimable + SwapCached + MemFree + SUnreclaim + VmallocUsed + PageTables + Percpu + Mapped + Buffers + Mlocked + Writeback + Hugepagesize + HardwareCorrupted +11: MemTotal = Active + AnonHugePages + Inactive(anon) + Dirty + DirectMap2M + Slab + SReclaimable + SwapCached + MemFree + SUnreclaim + DirectMap4k + VmallocUsed + Unevictable + Mlocked + KernelStack +12: MemTotal = Active + AnonHugePages + Inactive(anon) + Dirty + DirectMap2M + Slab + KReclaimable + SwapCached + MemFree + SUnreclaim + VmallocUsed + PageTables + Percpu + Mapped + Buffers + Mlocked + Writeback + Hugepagesize + HardwareCorrupted +13: MemTotal = Active + AnonHugePages + Inactive(anon) + Dirty + DirectMap2M + Slab + KReclaimable + SwapCached + MemFree + SUnreclaim + DirectMap4k + VmallocUsed + Unevictable + Mlocked + KernelStack +14: MemTotal = Active + AnonHugePages + Active(anon) + DirectMap2M + SReclaimable + DirectMap4k + VmallocUsed + Percpu + Mapped + Shmem + Buffers + Mlocked + KernelStack + Hugepagesize + HardwareCorrupted +15: MemTotal = Active + AnonHugePages + Active(anon) + DirectMap2M + KReclaimable + DirectMap4k + VmallocUsed + Percpu + Mapped + Shmem + Buffers + Mlocked + KernelStack + Hugepagesize + HardwareCorrupted +16: MemTotal = Active + Inactive(file) + Inactive(anon) + SReclaimable + SwapCached + SUnreclaim + DirectMap4k + Buffers + Unevictable + Mlocked + KernelStack + Writeback + HardwareCorrupted +17: MemTotal = Active + Inactive(file) + Inactive(anon) + KReclaimable + SwapCached + SUnreclaim + DirectMap4k + Buffers + Unevictable + Mlocked + KernelStack + Writeback + HardwareCorrupted +18: MemTotal = Active + Inactive(file) + Inactive(anon) + Slab + SwapCached + DirectMap4k + Buffers + Unevictable + Mlocked + KernelStack + Writeback + HardwareCorrupted +19: MemTotal = Active + Inactive + SReclaimable + SwapCached + SUnreclaim + DirectMap4k + Buffers + Unevictable + Mlocked + KernelStack + Writeback + HardwareCorrupted +20: MemTotal = Active + Inactive + KReclaimable + SwapCached + SUnreclaim + DirectMap4k + Buffers + Unevictable + Mlocked + KernelStack + Writeback + HardwareCorrupted +21: MemTotal = Active + Inactive + Slab + SwapCached + DirectMap4k + Buffers + Unevictable + Mlocked + KernelStack + Writeback + HardwareCorrupted +22: MemTotal = Cached + SwapTotal + Inactive(anon) + DirectMap2M + SReclaimable + SwapCached + MemFree + DirectMap4k + PageTables + Percpu + KernelStack + Writeback + HardwareCorrupted +23: MemTotal = Cached + SwapTotal + Inactive(anon) + DirectMap2M + KReclaimable + SwapCached + MemFree + DirectMap4k + PageTables + Percpu + KernelStack + Writeback + HardwareCorrupted +24: MemTotal = Cached + SwapTotal + Inactive(anon) + Dirty + SwapCached + SUnreclaim + Percpu + HardwareCorrupted +25: MemTotal = Cached + Active(anon) + Inactive(anon) + SReclaimable + SwapCached + SUnreclaim + PageTables + Percpu + Mapped + Buffers + KernelStack + HardwareCorrupted +26: MemTotal = Cached + Active(anon) + Inactive(anon) + KReclaimable + SwapCached + SUnreclaim + PageTables + Percpu + Mapped + Buffers + KernelStack + HardwareCorrupted +27: MemTotal = Cached + Active(anon) + Inactive(anon) + Slab + SwapCached + PageTables + Percpu + Mapped + Buffers + KernelStack + HardwareCorrupted +28: MemTotal = MemAvailable + SwapTotal + Inactive(anon) + DirectMap2M + KReclaimable + SReclaimable + SwapCached + Buffers + Hugepagesize +29: MemTotal = CommitLimit + Active(anon) + Inactive(anon) + SUnreclaim + VmallocUsed + Mapped + Shmem + KernelStack + Hugepagesize + HardwareCorrupted +30: DirectMap1G = AnonPages + Active(file) + AnonHugePages + Dirty + DirectMap2M + Slab + KReclaimable + SReclaimable + MemFree + DirectMap4k + VmallocUsed + Mapped + Shmem + Buffers + Unevictable + Mlocked + KernelStack + Hugepagesize + HardwareCorrupted +31: DirectMap1G = Inactive(file) + Active(file) + SwapTotal + Inactive(anon) + DirectMap2M + SReclaimable + SUnreclaim + VmallocUsed + Percpu + Mapped + Shmem + Writeback + HardwareCorrupted +32: DirectMap1G = Inactive(file) + Active(file) + SwapTotal + Inactive(anon) + DirectMap2M + KReclaimable + SUnreclaim + VmallocUsed + Percpu + Mapped + Shmem + Writeback + HardwareCorrupted +33: DirectMap1G = Inactive(file) + Active(file) + SwapTotal + Inactive(anon) + DirectMap2M + Slab + VmallocUsed + Percpu + Mapped + Shmem + Writeback + HardwareCorrupted +34: DirectMap1G = Inactive(file) + Active(file) + Active(anon) + Inactive(anon) + SReclaimable + DirectMap4k + VmallocUsed + Shmem + Buffers + KernelStack + Writeback +35: DirectMap1G = Inactive(file) + Active(file) + Active(anon) + Inactive(anon) + KReclaimable + DirectMap4k + VmallocUsed + Shmem + Buffers + KernelStack + Writeback +36: DirectMap1G = Inactive + Active(file) + SwapTotal + DirectMap2M + SReclaimable + SUnreclaim + VmallocUsed + Percpu + Mapped + Shmem + Writeback + HardwareCorrupted +37: DirectMap1G = Inactive + Active(file) + SwapTotal + DirectMap2M + KReclaimable + SUnreclaim + VmallocUsed + Percpu + Mapped + Shmem + Writeback + HardwareCorrupted +38: DirectMap1G = Inactive + Active(file) + SwapTotal + DirectMap2M + Slab + VmallocUsed + Percpu + Mapped + Shmem + Writeback + HardwareCorrupted +39: DirectMap1G = Inactive + Active(file) + Active(anon) + SReclaimable + DirectMap4k + VmallocUsed + Shmem + Buffers + KernelStack + Writeback +40: DirectMap1G = Inactive + Active(file) + Active(anon) + KReclaimable + DirectMap4k + VmallocUsed + Shmem + Buffers + KernelStack + Writeback +41: DirectMap1G = Active + Active(file) + Inactive(anon) + KReclaimable + SReclaimable + SwapCached + MemFree + SUnreclaim + DirectMap4k + Mapped + Unevictable + KernelStack + Writeback + Hugepagesize + HardwareCorrupted +42: DirectMap1G = Active + Active(file) + Inactive(anon) + Slab + SReclaimable + SwapCached + MemFree + DirectMap4k + Mapped + Unevictable + KernelStack + Writeback + Hugepagesize + HardwareCorrupted +43: DirectMap1G = Active + Active(file) + Inactive(anon) + Slab + KReclaimable + SwapCached + MemFree + DirectMap4k + Mapped + Unevictable + KernelStack + Writeback + Hugepagesize + HardwareCorrupted +44: DirectMap1G = Active + Inactive(file) + Inactive(anon) + SReclaimable + DirectMap4k + VmallocUsed + Shmem + Buffers + KernelStack + Writeback +45: DirectMap1G = Active + Inactive(file) + Inactive(anon) + KReclaimable + DirectMap4k + VmallocUsed + Shmem + Buffers + KernelStack + Writeback +46: DirectMap1G = Active + Inactive + SReclaimable + DirectMap4k + VmallocUsed + Shmem + Buffers + KernelStack + Writeback +47: DirectMap1G = Active + Inactive + KReclaimable + DirectMap4k + VmallocUsed + Shmem + Buffers + KernelStack + Writeback +48: DirectMap1G = Cached + AnonHugePages + Dirty + DirectMap2M + KReclaimable + SReclaimable + SUnreclaim + DirectMap4k + VmallocUsed + PageTables + Percpu + Unevictable + KernelStack + Hugepagesize + HardwareCorrupted +49: DirectMap1G = Cached + AnonHugePages + Dirty + DirectMap2M + Slab + SReclaimable + DirectMap4k + VmallocUsed + PageTables + Percpu + Unevictable + KernelStack + Hugepagesize + HardwareCorrupted +50: DirectMap1G = Cached + AnonHugePages + Dirty + DirectMap2M + Slab + KReclaimable + DirectMap4k + VmallocUsed + PageTables + Percpu + Unevictable + KernelStack + Hugepagesize + HardwareCorrupted +51: DirectMap1G = Cached + Active(file) + KReclaimable + SReclaimable + MemFree + SUnreclaim + DirectMap4k + PageTables + Percpu + Shmem + Mlocked + KernelStack + HardwareCorrupted +52: DirectMap1G = Cached + Active(file) + Slab + SReclaimable + MemFree + DirectMap4k + PageTables + Percpu + Shmem + Mlocked + KernelStack + HardwareCorrupted +53: DirectMap1G = Cached + Active(file) + Slab + KReclaimable + MemFree + DirectMap4k + PageTables + Percpu + Shmem + Mlocked + KernelStack + HardwareCorrupted +54: DirectMap1G = Cached + Inactive(file) + SwapCached + VmallocUsed + Shmem + Buffers + KernelStack + Writeback + Hugepagesize +55: DirectMap1G = MemAvailable + AnonPages + SReclaimable + SwapCached + VmallocUsed + Mapped + Mlocked + KernelStack + Writeback + HardwareCorrupted +56: DirectMap1G = MemAvailable + AnonPages + KReclaimable + SwapCached + VmallocUsed + Mapped + Mlocked + KernelStack + Writeback + HardwareCorrupted +57: Committed_AS = AnonHugePages + Active(anon) + SwapTotal + Dirty + DirectMap2M + Slab + MemFree + SUnreclaim + DirectMap4k + VmallocUsed + PageTables + Percpu + Mapped + Unevictable + Mlocked + Writeback + Hugepagesize +58: Committed_AS = Active(file) + SwapTotal + Inactive(anon) + Dirty + DirectMap2M + SReclaimable + MemFree + DirectMap4k + PageTables + Percpu + Mapped + Shmem + Buffers + Unevictable + Mlocked + KernelStack + Writeback + HardwareCorrupted +59: Committed_AS = Active(file) + SwapTotal + Inactive(anon) + Dirty + DirectMap2M + KReclaimable + MemFree + DirectMap4k + PageTables + Percpu + Mapped + Shmem + Buffers + Unevictable + Mlocked + KernelStack + Writeback + HardwareCorrupted +60: Committed_AS = AnonPages + SwapTotal + Inactive(anon) + Dirty + DirectMap2M + SUnreclaim + VmallocUsed + Percpu + Mapped + Shmem + Buffers + Mlocked + KernelStack + Writeback + Hugepagesize + HardwareCorrupted +61: Committed_AS = Inactive(file) + SwapTotal + Inactive(anon) + Dirty + Slab + KReclaimable + SReclaimable + SUnreclaim + DirectMap4k + PageTables + Shmem + Unevictable + Mlocked + KernelStack + Hugepagesize +62: Committed_AS = Inactive + Inactive(anon) + Dirty + DirectMap2M + Slab + SwapCached + MemFree + SUnreclaim + VmallocUsed + PageTables + Percpu + Mapped + Buffers + Unevictable + Mlocked + HardwareCorrupted +63: Committed_AS = Inactive + SwapTotal + Dirty + Slab + KReclaimable + SReclaimable + SUnreclaim + DirectMap4k + PageTables + Shmem + Unevictable + Mlocked + KernelStack + Hugepagesize +64: Committed_AS = Cached + DirectMap2M + Slab + MemFree + SUnreclaim + DirectMap4k + Shmem + Buffers + Unevictable + Mlocked + KernelStack + Writeback + Hugepagesize + HardwareCorrupted +65: Committed_AS = CommitLimit + DirectMap2M + SwapCached + VmallocUsed + Percpu + Mapped + Shmem + Mlocked + Writeback + Hugepagesize +66: CommitLimit = AnonHugePages + Active(anon) + SwapTotal + Dirty + SwapCached + MemFree + DirectMap4k + VmallocUsed + Percpu + Mapped + Shmem + KernelStack +67: CommitLimit = Active(file) + AnonHugePages + Dirty + DirectMap2M + Slab + SwapCached + MemFree + SUnreclaim + DirectMap4k + PageTables + Mapped + KernelStack + Writeback + Hugepagesize +68: CommitLimit = Inactive(file) + SwapTotal + Inactive(anon) + Slab + KReclaimable + SReclaimable + SwapCached + DirectMap4k + Percpu + Buffers + Mlocked + KernelStack + Writeback +69: CommitLimit = Inactive + SwapTotal + Slab + KReclaimable + SReclaimable + SwapCached + DirectMap4k + Percpu + Buffers + Mlocked + KernelStack + Writeback +70: CommitLimit = Cached + SwapCached + MemFree + VmallocUsed + Mapped + Shmem + Unevictable + Mlocked + Writeback + HardwareCorrupted +71: MemAvailable = AnonPages + AnonHugePages + Dirty + DirectMap2M + MemFree + DirectMap4k + VmallocUsed + Mapped + Unevictable + KernelStack + Writeback + HardwareCorrupted +72: MemAvailable = Inactive(file) + SwapTotal + Inactive(anon) + SReclaimable + SwapCached + MemFree + SUnreclaim + VmallocUsed + Percpu + Mapped + Hugepagesize + HardwareCorrupted +73: MemAvailable = Inactive(file) + SwapTotal + Inactive(anon) + KReclaimable + SwapCached + MemFree + SUnreclaim + VmallocUsed + Percpu + Mapped + Hugepagesize + HardwareCorrupted +74: MemAvailable = Inactive(file) + SwapTotal + Inactive(anon) + Slab + SwapCached + MemFree + VmallocUsed + Percpu + Mapped + Hugepagesize + HardwareCorrupted +75: MemAvailable = Inactive(file) + Active(file) + PageTables + Percpu + Shmem + Buffers + Mlocked + KernelStack + Hugepagesize +76: MemAvailable = Inactive + SwapTotal + SReclaimable + SwapCached + MemFree + SUnreclaim + VmallocUsed + Percpu + Mapped + Hugepagesize + HardwareCorrupted +77: MemAvailable = Inactive + SwapTotal + KReclaimable + SwapCached + MemFree + SUnreclaim + VmallocUsed + Percpu + Mapped + Hugepagesize + HardwareCorrupted +78: MemAvailable = Inactive + SwapTotal + Slab + SwapCached + MemFree + VmallocUsed + Percpu + Mapped + Hugepagesize + HardwareCorrupted +79: Cached = AnonPages + SwapTotal + Inactive(anon) + Slab + SwapCached + MemFree + SUnreclaim + DirectMap4k + VmallocUsed + Percpu + Shmem + Buffers + KernelStack +80: Cached = AnonPages + AnonHugePages + Dirty + DirectMap2M + SUnreclaim + VmallocUsed + Percpu + Mlocked + KernelStack + Writeback + HardwareCorrupted +81: Active = Active(anon) + SwapTotal + Inactive(anon) + SwapCached + MemFree + SUnreclaim + DirectMap4k + VmallocUsed + PageTables + Percpu + Mlocked + Writeback + Hugepagesize +82: Active = Active(file) + Active(anon) +83: Inactive = AnonHugePages + Inactive(anon) + Dirty + DirectMap2M + Slab + SUnreclaim + PageTables + Shmem + Unevictable + KernelStack +84: Inactive = Inactive(file) + Inactive(anon) +85: Inactive(file) = AnonHugePages + Dirty + DirectMap2M + Slab + SUnreclaim + PageTables + Shmem + Unevictable + KernelStack +86: Active(file) = SwapTotal + Inactive(anon) + SwapCached + MemFree + SUnreclaim + DirectMap4k + VmallocUsed + PageTables + Percpu + Mlocked + Writeback + Hugepagesize +87: Slab = SReclaimable + SUnreclaim +88: Slab = KReclaimable + SUnreclaim +89: KReclaimable = SReclaimable invalid sums (85 sums): -[{'total': 'MemTotal', 'components': ['Active(file)', 'AnonHugePages', 'Active(anon)', 'Inactive(anon)', 'Dirty', 'DirectMap2M', 'Slab', 'SReclaimable', 'SwapCached', 'MemFree', 'SUnreclaim', 'VmallocUsed', 'PageTables', 'Percpu', 'Mapped', 'Buffers', 'Mlocked', 'Writeback', 'Hugepagesize', 'HardwareCorrupted']}, {'total': 'MemTotal', 'components': ['Active(file)', 'AnonHugePages', 'Active(anon)', 'Inactive(anon)', 'Dirty', 'DirectMap2M', 'Slab', 'SReclaimable', 'SwapCached', 'MemFree', 'SUnreclaim', 'DirectMap4k', 'VmallocUsed', 'Unevictable', 'Mlocked', 'KernelStack']}, {'total': 'MemTotal', 'components': ['Active(file)', 'AnonHugePages', 'Active(anon)', 'Inactive(anon)', 'Dirty', 'DirectMap2M', 'Slab', 'KReclaimable', 'SwapCached', 'MemFree', 'SUnreclaim', 'VmallocUsed', 'PageTables', 'Percpu', 'Mapped', 'Buffers', 'Mlocked', 'Writeback', 'Hugepagesize', 'HardwareCorrupted']}, {'total': 'MemTotal', 'components': ['Active(file)', 'AnonHugePages', 'Active(anon)', 'Inactive(anon)', 'Dirty', 'DirectMap2M', 'Slab', 'KReclaimable', 'SwapCached', 'MemFree', 'SUnreclaim', 'DirectMap4k', 'VmallocUsed', 'Unevictable', 'Mlocked', 'KernelStack']}, {'total': 'MemTotal', 'components': ['Inactive(file)', 'Active(file)', 'Active(anon)', 'Inactive(anon)', 'SReclaimable', 'SwapCached', 'SUnreclaim', 'DirectMap4k', 'Buffers', 'Unevictable', 'Mlocked', 'KernelStack', 'Writeback', 'HardwareCorrupted']}, {'total': 'MemTotal', 'components': ['Inactive(file)', 'Active(file)', 'Active(anon)', 'Inactive(anon)', 'KReclaimable', 'SwapCached', 'SUnreclaim', 'DirectMap4k', 'Buffers', 'Unevictable', 'Mlocked', 'KernelStack', 'Writeback', 'HardwareCorrupted']}, {'total': 'MemTotal', 'components': ['Inactive(file)', 'Active(file)', 'Active(anon)', 'Inactive(anon)', 'Slab', 'SwapCached', 'DirectMap4k', 'Buffers', 'Unevictable', 'Mlocked', 'KernelStack', 'Writeback', 'HardwareCorrupted']}, {'total': 'MemTotal', 'components': ['Inactive', 'Active(file)', 'Active(anon)', 'SReclaimable', 'SwapCached', 'SUnreclaim', 'DirectMap4k', 'Buffers', 'Unevictable', 'Mlocked', 'KernelStack', 'Writeback', 'HardwareCorrupted']}, {'total': 'MemTotal', 'components': ['Inactive', 'Active(file)', 'Active(anon)', 'KReclaimable', 'SwapCached', 'SUnreclaim', 'DirectMap4k', 'Buffers', 'Unevictable', 'Mlocked', 'KernelStack', 'Writeback', 'HardwareCorrupted']}, {'total': 'MemTotal', 'components': ['Inactive', 'Active(file)', 'Active(anon)', 'Slab', 'SwapCached', 'DirectMap4k', 'Buffers', 'Unevictable', 'Mlocked', 'KernelStack', 'Writeback', 'HardwareCorrupted']}, {'total': 'MemTotal', 'components': ['Active', 'AnonHugePages', 'Inactive(anon)', 'Dirty', 'DirectMap2M', 'Slab', 'SReclaimable', 'SwapCached', 'MemFree', 'SUnreclaim', 'VmallocUsed', 'PageTables', 'Percpu', 'Mapped', 'Buffers', 'Mlocked', 'Writeback', 'Hugepagesize', 'HardwareCorrupted']}, {'total': 'MemTotal', 'components': ['Active', 'AnonHugePages', 'Inactive(anon)', 'Dirty', 'DirectMap2M', 'Slab', 'SReclaimable', 'SwapCached', 'MemFree', 'SUnreclaim', 'DirectMap4k', 'VmallocUsed', 'Unevictable', 'Mlocked', 'KernelStack']}, {'total': 'MemTotal', 'components': ['Active', 'AnonHugePages', 'Inactive(anon)', 'Dirty', 'DirectMap2M', 'Slab', 'KReclaimable', 'SwapCached', 'MemFree', 'SUnreclaim', 'VmallocUsed', 'PageTables', 'Percpu', 'Mapped', 'Buffers', 'Mlocked', 'Writeback', 'Hugepagesize', 'HardwareCorrupted']}, {'total': 'MemTotal', 'components': ['Active', 'AnonHugePages', 'Inactive(anon)', 'Dirty', 'DirectMap2M', 'Slab', 'KReclaimable', 'SwapCached', 'MemFree', 'SUnreclaim', 'DirectMap4k', 'VmallocUsed', 'Unevictable', 'Mlocked', 'KernelStack']}, {'total': 'MemTotal', 'components': ['Active', 'AnonHugePages', 'Active(anon)', 'DirectMap2M', 'SReclaimable', 'DirectMap4k', 'VmallocUsed', 'Percpu', 'Mapped', 'Shmem', 'Buffers', 'Mlocked', 'KernelStack', 'Hugepagesize', 'HardwareCorrupted']}, {'total': 'MemTotal', 'components': ['Active', 'AnonHugePages', 'Active(anon)', 'DirectMap2M', 'KReclaimable', 'DirectMap4k', 'VmallocUsed', 'Percpu', 'Mapped', 'Shmem', 'Buffers', 'Mlocked', 'KernelStack', 'Hugepagesize', 'HardwareCorrupted']}, {'total': 'MemTotal', 'components': ['Active', 'Inactive(file)', 'Inactive(anon)', 'SReclaimable', 'SwapCached', 'SUnreclaim', 'DirectMap4k', 'Buffers', 'Unevictable', 'Mlocked', 'KernelStack', 'Writeback', 'HardwareCorrupted']}, {'total': 'MemTotal', 'components': ['Active', 'Inactive(file)', 'Inactive(anon)', 'KReclaimable', 'SwapCached', 'SUnreclaim', 'DirectMap4k', 'Buffers', 'Unevictable', 'Mlocked', 'KernelStack', 'Writeback', 'HardwareCorrupted']}, {'total': 'MemTotal', 'components': ['Active', 'Inactive(file)', 'Inactive(anon)', 'Slab', 'SwapCached', 'DirectMap4k', 'Buffers', 'Unevictable', 'Mlocked', 'KernelStack', 'Writeback', 'HardwareCorrupted']}, {'total': 'MemTotal', 'components': ['Active', 'Inactive', 'SReclaimable', 'SwapCached', 'SUnreclaim', 'DirectMap4k', 'Buffers', 'Unevictable', 'Mlocked', 'KernelStack', 'Writeback', 'HardwareCorrupted']}, {'total': 'MemTotal', 'components': ['Active', 'Inactive', 'KReclaimable', 'SwapCached', 'SUnreclaim', 'DirectMap4k', 'Buffers', 'Unevictable', 'Mlocked', 'KernelStack', 'Writeback', 'HardwareCorrupted']}, {'total': 'MemTotal', 'components': ['Active', 'Inactive', 'Slab', 'SwapCached', 'DirectMap4k', 'Buffers', 'Unevictable', 'Mlocked', 'KernelStack', 'Writeback', 'HardwareCorrupted']}, {'total': 'MemTotal', 'components': ['Cached', 'SwapTotal', 'Inactive(anon)', 'DirectMap2M', 'SReclaimable', 'SwapCached', 'MemFree', 'DirectMap4k', 'PageTables', 'Percpu', 'KernelStack', 'Writeback', 'HardwareCorrupted']}, {'total': 'MemTotal', 'components': ['Cached', 'SwapTotal', 'Inactive(anon)', 'DirectMap2M', 'KReclaimable', 'SwapCached', 'MemFree', 'DirectMap4k', 'PageTables', 'Percpu', 'KernelStack', 'Writeback', 'HardwareCorrupted']}, {'total': 'MemTotal', 'components': ['Cached', 'SwapTotal', 'Inactive(anon)', 'Dirty', 'SwapCached', 'SUnreclaim', 'Percpu', 'HardwareCorrupted']}, {'total': 'MemTotal', 'components': ['Cached', 'Active(anon)', 'Inactive(anon)', 'SReclaimable', 'SwapCached', 'SUnreclaim', 'PageTables', 'Percpu', 'Mapped', 'Buffers', 'KernelStack', 'HardwareCorrupted']}, {'total': 'MemTotal', 'components': ['Cached', 'Active(anon)', 'Inactive(anon)', 'KReclaimable', 'SwapCached', 'SUnreclaim', 'PageTables', 'Percpu', 'Mapped', 'Buffers', 'KernelStack', 'HardwareCorrupted']}, {'total': 'MemTotal', 'components': ['Cached', 'Active(anon)', 'Inactive(anon)', 'Slab', 'SwapCached', 'PageTables', 'Percpu', 'Mapped', 'Buffers', 'KernelStack', 'HardwareCorrupted']}, {'total': 'MemTotal', 'components': ['MemAvailable', 'SwapTotal', 'Inactive(anon)', 'DirectMap2M', 'KReclaimable', 'SReclaimable', 'SwapCached', 'Buffers', 'Hugepagesize']}, {'total': 'MemTotal', 'components': ['CommitLimit', 'Active(anon)', 'Inactive(anon)', 'SUnreclaim', 'VmallocUsed', 'Mapped', 'Shmem', 'KernelStack', 'Hugepagesize', 'HardwareCorrupted']}, {'total': 'DirectMap1G', 'components': ['AnonPages', 'Active(file)', 'AnonHugePages', 'Dirty', 'DirectMap2M', 'Slab', 'KReclaimable', 'SReclaimable', 'MemFree', 'DirectMap4k', 'VmallocUsed', 'Mapped', 'Shmem', 'Buffers', 'Unevictable', 'Mlocked', 'KernelStack', 'Hugepagesize', 'HardwareCorrupted']}, {'total': 'DirectMap1G', 'components': ['Inactive(file)', 'Active(file)', 'SwapTotal', 'Inactive(anon)', 'DirectMap2M', 'SReclaimable', 'SUnreclaim', 'VmallocUsed', 'Percpu', 'Mapped', 'Shmem', 'Writeback', 'HardwareCorrupted']}, {'total': 'DirectMap1G', 'components': ['Inactive(file)', 'Active(file)', 'SwapTotal', 'Inactive(anon)', 'DirectMap2M', 'KReclaimable', 'SUnreclaim', 'VmallocUsed', 'Percpu', 'Mapped', 'Shmem', 'Writeback', 'HardwareCorrupted']}, {'total': 'DirectMap1G', 'components': ['Inactive(file)', 'Active(file)', 'SwapTotal', 'Inactive(anon)', 'DirectMap2M', 'Slab', 'VmallocUsed', 'Percpu', 'Mapped', 'Shmem', 'Writeback', 'HardwareCorrupted']}, {'total': 'DirectMap1G', 'components': ['Inactive(file)', 'Active(file)', 'Active(anon)', 'Inactive(anon)', 'SReclaimable', 'DirectMap4k', 'VmallocUsed', 'Shmem', 'Buffers', 'KernelStack', 'Writeback']}, {'total': 'DirectMap1G', 'components': ['Inactive(file)', 'Active(file)', 'Active(anon)', 'Inactive(anon)', 'KReclaimable', 'DirectMap4k', 'VmallocUsed', 'Shmem', 'Buffers', 'KernelStack', 'Writeback']}, {'total': 'DirectMap1G', 'components': ['Inactive', 'Active(file)', 'SwapTotal', 'DirectMap2M', 'SReclaimable', 'SUnreclaim', 'VmallocUsed', 'Percpu', 'Mapped', 'Shmem', 'Writeback', 'HardwareCorrupted']}, {'total': 'DirectMap1G', 'components': ['Inactive', 'Active(file)', 'SwapTotal', 'DirectMap2M', 'KReclaimable', 'SUnreclaim', 'VmallocUsed', 'Percpu', 'Mapped', 'Shmem', 'Writeback', 'HardwareCorrupted']}, {'total': 'DirectMap1G', 'components': ['Inactive', 'Active(file)', 'SwapTotal', 'DirectMap2M', 'Slab', 'VmallocUsed', 'Percpu', 'Mapped', 'Shmem', 'Writeback', 'HardwareCorrupted']}, {'total': 'DirectMap1G', 'components': ['Inactive', 'Active(file)', 'Active(anon)', 'SReclaimable', 'DirectMap4k', 'VmallocUsed', 'Shmem', 'Buffers', 'KernelStack', 'Writeback']}, {'total': 'DirectMap1G', 'components': ['Inactive', 'Active(file)', 'Active(anon)', 'KReclaimable', 'DirectMap4k', 'VmallocUsed', 'Shmem', 'Buffers', 'KernelStack', 'Writeback']}, {'total': 'DirectMap1G', 'components': ['Active', 'Active(file)', 'Inactive(anon)', 'KReclaimable', 'SReclaimable', 'SwapCached', 'MemFree', 'SUnreclaim', 'DirectMap4k', 'Mapped', 'Unevictable', 'KernelStack', 'Writeback', 'Hugepagesize', 'HardwareCorrupted']}, {'total': 'DirectMap1G', 'components': ['Active', 'Active(file)', 'Inactive(anon)', 'Slab', 'SReclaimable', 'SwapCached', 'MemFree', 'DirectMap4k', 'Mapped', 'Unevictable', 'KernelStack', 'Writeback', 'Hugepagesize', 'HardwareCorrupted']}, {'total': 'DirectMap1G', 'components': ['Active', 'Active(file)', 'Inactive(anon)', 'Slab', 'KReclaimable', 'SwapCached', 'MemFree', 'DirectMap4k', 'Mapped', 'Unevictable', 'KernelStack', 'Writeback', 'Hugepagesize', 'HardwareCorrupted']}, {'total': 'DirectMap1G', 'components': ['Active', 'Inactive(file)', 'Inactive(anon)', 'SReclaimable', 'DirectMap4k', 'VmallocUsed', 'Shmem', 'Buffers', 'KernelStack', 'Writeback']}, {'total': 'DirectMap1G', 'components': ['Active', 'Inactive(file)', 'Inactive(anon)', 'KReclaimable', 'DirectMap4k', 'VmallocUsed', 'Shmem', 'Buffers', 'KernelStack', 'Writeback']}, {'total': 'DirectMap1G', 'components': ['Active', 'Inactive', 'SReclaimable', 'DirectMap4k', 'VmallocUsed', 'Shmem', 'Buffers', 'KernelStack', 'Writeback']}, {'total': 'DirectMap1G', 'components': ['Active', 'Inactive', 'KReclaimable', 'DirectMap4k', 'VmallocUsed', 'Shmem', 'Buffers', 'KernelStack', 'Writeback']}, {'total': 'DirectMap1G', 'components': ['Cached', 'AnonHugePages', 'Dirty', 'DirectMap2M', 'KReclaimable', 'SReclaimable', 'SUnreclaim', 'DirectMap4k', 'VmallocUsed', 'PageTables', 'Percpu', 'Unevictable', 'KernelStack', 'Hugepagesize', 'HardwareCorrupted']}, {'total': 'DirectMap1G', 'components': ['Cached', 'AnonHugePages', 'Dirty', 'DirectMap2M', 'Slab', 'SReclaimable', 'DirectMap4k', 'VmallocUsed', 'PageTables', 'Percpu', 'Unevictable', 'KernelStack', 'Hugepagesize', 'HardwareCorrupted']}, {'total': 'DirectMap1G', 'components': ['Cached', 'AnonHugePages', 'Dirty', 'DirectMap2M', 'Slab', 'KReclaimable', 'DirectMap4k', 'VmallocUsed', 'PageTables', 'Percpu', 'Unevictable', 'KernelStack', 'Hugepagesize', 'HardwareCorrupted']}, {'total': 'DirectMap1G', 'components': ['Cached', 'Active(file)', 'KReclaimable', 'SReclaimable', 'MemFree', 'SUnreclaim', 'DirectMap4k', 'PageTables', 'Percpu', 'Shmem', 'Mlocked', 'KernelStack', 'HardwareCorrupted']}, {'total': 'DirectMap1G', 'components': ['Cached', 'Active(file)', 'Slab', 'SReclaimable', 'MemFree', 'DirectMap4k', 'PageTables', 'Percpu', 'Shmem', 'Mlocked', 'KernelStack', 'HardwareCorrupted']}, {'total': 'DirectMap1G', 'components': ['Cached', 'Active(file)', 'Slab', 'KReclaimable', 'MemFree', 'DirectMap4k', 'PageTables', 'Percpu', 'Shmem', 'Mlocked', 'KernelStack', 'HardwareCorrupted']}, {'total': 'DirectMap1G', 'components': ['Cached', 'Inactive(file)', 'SwapCached', 'VmallocUsed', 'Shmem', 'Buffers', 'KernelStack', 'Writeback', 'Hugepagesize']}, {'total': 'DirectMap1G', 'components': ['MemAvailable', 'AnonPages', 'SReclaimable', 'SwapCached', 'VmallocUsed', 'Mapped', 'Mlocked', 'KernelStack', 'Writeback', 'HardwareCorrupted']}, {'total': 'DirectMap1G', 'components': ['MemAvailable', 'AnonPages', 'KReclaimable', 'SwapCached', 'VmallocUsed', 'Mapped', 'Mlocked', 'KernelStack', 'Writeback', 'HardwareCorrupted']}, {'total': 'Committed_AS', 'components': ['AnonHugePages', 'Active(anon)', 'SwapTotal', 'Dirty', 'DirectMap2M', 'Slab', 'MemFree', 'SUnreclaim', 'DirectMap4k', 'VmallocUsed', 'PageTables', 'Percpu', 'Mapped', 'Unevictable', 'Mlocked', 'Writeback', 'Hugepagesize']}, {'total': 'Committed_AS', 'components': ['Active(file)', 'SwapTotal', 'Inactive(anon)', 'Dirty', 'DirectMap2M', 'SReclaimable', 'MemFree', 'DirectMap4k', 'PageTables', 'Percpu', 'Mapped', 'Shmem', 'Buffers', 'Unevictable', 'Mlocked', 'KernelStack', 'Writeback', 'HardwareCorrupted']}, {'total': 'Committed_AS', 'components': ['Active(file)', 'SwapTotal', 'Inactive(anon)', 'Dirty', 'DirectMap2M', 'KReclaimable', 'MemFree', 'DirectMap4k', 'PageTables', 'Percpu', 'Mapped', 'Shmem', 'Buffers', 'Unevictable', 'Mlocked', 'KernelStack', 'Writeback', 'HardwareCorrupted']}, {'total': 'Committed_AS', 'components': ['AnonPages', 'SwapTotal', 'Inactive(anon)', 'Dirty', 'DirectMap2M', 'SUnreclaim', 'VmallocUsed', 'Percpu', 'Mapped', 'Shmem', 'Buffers', 'Mlocked', 'KernelStack', 'Writeback', 'Hugepagesize', 'HardwareCorrupted']}, {'total': 'Committed_AS', 'components': ['Inactive(file)', 'SwapTotal', 'Inactive(anon)', 'Dirty', 'Slab', 'KReclaimable', 'SReclaimable', 'SUnreclaim', 'DirectMap4k', 'PageTables', 'Shmem', 'Unevictable', 'Mlocked', 'KernelStack', 'Hugepagesize']}, {'total': 'Committed_AS', 'components': ['Inactive', 'Inactive(anon)', 'Dirty', 'DirectMap2M', 'Slab', 'SwapCached', 'MemFree', 'SUnreclaim', 'VmallocUsed', 'PageTables', 'Percpu', 'Mapped', 'Buffers', 'Unevictable', 'Mlocked', 'HardwareCorrupted']}, {'total': 'Committed_AS', 'components': ['Inactive', 'SwapTotal', 'Dirty', 'Slab', 'KReclaimable', 'SReclaimable', 'SUnreclaim', 'DirectMap4k', 'PageTables', 'Shmem', 'Unevictable', 'Mlocked', 'KernelStack', 'Hugepagesize']}, {'total': 'Committed_AS', 'components': ['Cached', 'DirectMap2M', 'Slab', 'MemFree', 'SUnreclaim', 'DirectMap4k', 'Shmem', 'Buffers', 'Unevictable', 'Mlocked', 'KernelStack', 'Writeback', 'Hugepagesize', 'HardwareCorrupted']}, {'total': 'Committed_AS', 'components': ['CommitLimit', 'DirectMap2M', 'SwapCached', 'VmallocUsed', 'Percpu', 'Mapped', 'Shmem', 'Mlocked', 'Writeback', 'Hugepagesize']}, {'total': 'CommitLimit', 'components': ['AnonHugePages', 'Active(anon)', 'SwapTotal', 'Dirty', 'SwapCached', 'MemFree', 'DirectMap4k', 'VmallocUsed', 'Percpu', 'Mapped', 'Shmem', 'KernelStack']}, {'total': 'CommitLimit', 'components': ['Active(file)', 'AnonHugePages', 'Dirty', 'DirectMap2M', 'Slab', 'SwapCached', 'MemFree', 'SUnreclaim', 'DirectMap4k', 'PageTables', 'Mapped', 'KernelStack', 'Writeback', 'Hugepagesize']}, {'total': 'CommitLimit', 'components': ['Inactive(file)', 'SwapTotal', 'Inactive(anon)', 'Slab', 'KReclaimable', 'SReclaimable', 'SwapCached', 'DirectMap4k', 'Percpu', 'Buffers', 'Mlocked', 'KernelStack', 'Writeback']}, {'total': 'CommitLimit', 'components': ['Inactive', 'SwapTotal', 'Slab', 'KReclaimable', 'SReclaimable', 'SwapCached', 'DirectMap4k', 'Percpu', 'Buffers', 'Mlocked', 'KernelStack', 'Writeback']}, {'total': 'CommitLimit', 'components': ['Cached', 'SwapCached', 'MemFree', 'VmallocUsed', 'Mapped', 'Shmem', 'Unevictable', 'Mlocked', 'Writeback', 'HardwareCorrupted']}, {'total': 'MemAvailable', 'components': ['AnonPages', 'AnonHugePages', 'Dirty', 'DirectMap2M', 'MemFree', 'DirectMap4k', 'VmallocUsed', 'Mapped', 'Unevictable', 'KernelStack', 'Writeback', 'HardwareCorrupted']}, {'total': 'MemAvailable', 'components': ['Inactive(file)', 'SwapTotal', 'Inactive(anon)', 'SReclaimable', 'SwapCached', 'MemFree', 'SUnreclaim', 'VmallocUsed', 'Percpu', 'Mapped', 'Hugepagesize', 'HardwareCorrupted']}, {'total': 'MemAvailable', 'components': ['Inactive(file)', 'SwapTotal', 'Inactive(anon)', 'KReclaimable', 'SwapCached', 'MemFree', 'SUnreclaim', 'VmallocUsed', 'Percpu', 'Mapped', 'Hugepagesize', 'HardwareCorrupted']}, {'total': 'MemAvailable', 'components': ['Inactive(file)', 'SwapTotal', 'Inactive(anon)', 'Slab', 'SwapCached', 'MemFree', 'VmallocUsed', 'Percpu', 'Mapped', 'Hugepagesize', 'HardwareCorrupted']}, {'total': 'MemAvailable', 'components': ['Inactive(file)', 'Active(file)', 'PageTables', 'Percpu', 'Shmem', 'Buffers', 'Mlocked', 'KernelStack', 'Hugepagesize']}, {'total': 'MemAvailable', 'components': ['Inactive', 'SwapTotal', 'SReclaimable', 'SwapCached', 'MemFree', 'SUnreclaim', 'VmallocUsed', 'Percpu', 'Mapped', 'Hugepagesize', 'HardwareCorrupted']}, {'total': 'MemAvailable', 'components': ['Inactive', 'SwapTotal', 'KReclaimable', 'SwapCached', 'MemFree', 'SUnreclaim', 'VmallocUsed', 'Percpu', 'Mapped', 'Hugepagesize', 'HardwareCorrupted']}, {'total': 'MemAvailable', 'components': ['Inactive', 'SwapTotal', 'Slab', 'SwapCached', 'MemFree', 'VmallocUsed', 'Percpu', 'Mapped', 'Hugepagesize', 'HardwareCorrupted']}, {'total': 'Cached', 'components': ['AnonPages', 'SwapTotal', 'Inactive(anon)', 'Slab', 'SwapCached', 'MemFree', 'SUnreclaim', 'DirectMap4k', 'VmallocUsed', 'Percpu', 'Shmem', 'Buffers', 'KernelStack']}, {'total': 'Cached', 'components': ['AnonPages', 'AnonHugePages', 'Dirty', 'DirectMap2M', 'SUnreclaim', 'VmallocUsed', 'Percpu', 'Mlocked', 'KernelStack', 'Writeback', 'HardwareCorrupted']}, {'total': 'Active', 'components': ['Active(anon)', 'SwapTotal', 'Inactive(anon)', 'SwapCached', 'MemFree', 'SUnreclaim', 'DirectMap4k', 'VmallocUsed', 'PageTables', 'Percpu', 'Mlocked', 'Writeback', 'Hugepagesize']}, {'total': 'Inactive', 'components': ['AnonHugePages', 'Inactive(anon)', 'Dirty', 'DirectMap2M', 'Slab', 'SUnreclaim', 'PageTables', 'Shmem', 'Unevictable', 'KernelStack']}, {'total': 'Inactive(file)', 'components': ['AnonHugePages', 'Dirty', 'DirectMap2M', 'Slab', 'SUnreclaim', 'PageTables', 'Shmem', 'Unevictable', 'KernelStack']}, {'total': 'Active(file)', 'components': ['SwapTotal', 'Inactive(anon)', 'SwapCached', 'MemFree', 'SUnreclaim', 'DirectMap4k', 'VmallocUsed', 'PageTables', 'Percpu', 'Mlocked', 'Writeback', 'Hugepagesize']}] +0: MemTotal = Active(file) + AnonHugePages + Active(anon) + Inactive(anon) + Dirty + DirectMap2M + Slab + SReclaimable + SwapCached + MemFree + SUnreclaim + VmallocUsed + PageTables + Percpu + Mapped + Buffers + Mlocked + Writeback + Hugepagesize + HardwareCorrupted +1: MemTotal = Active(file) + AnonHugePages + Active(anon) + Inactive(anon) + Dirty + DirectMap2M + Slab + SReclaimable + SwapCached + MemFree + SUnreclaim + DirectMap4k + VmallocUsed + Unevictable + Mlocked + KernelStack +2: MemTotal = Active(file) + AnonHugePages + Active(anon) + Inactive(anon) + Dirty + DirectMap2M + Slab + KReclaimable + SwapCached + MemFree + SUnreclaim + VmallocUsed + PageTables + Percpu + Mapped + Buffers + Mlocked + Writeback + Hugepagesize + HardwareCorrupted +3: MemTotal = Active(file) + AnonHugePages + Active(anon) + Inactive(anon) + Dirty + DirectMap2M + Slab + KReclaimable + SwapCached + MemFree + SUnreclaim + DirectMap4k + VmallocUsed + Unevictable + Mlocked + KernelStack +4: MemTotal = Inactive(file) + Active(file) + Active(anon) + Inactive(anon) + SReclaimable + SwapCached + SUnreclaim + DirectMap4k + Buffers + Unevictable + Mlocked + KernelStack + Writeback + HardwareCorrupted +5: MemTotal = Inactive(file) + Active(file) + Active(anon) + Inactive(anon) + KReclaimable + SwapCached + SUnreclaim + DirectMap4k + Buffers + Unevictable + Mlocked + KernelStack + Writeback + HardwareCorrupted +6: MemTotal = Inactive(file) + Active(file) + Active(anon) + Inactive(anon) + Slab + SwapCached + DirectMap4k + Buffers + Unevictable + Mlocked + KernelStack + Writeback + HardwareCorrupted +7: MemTotal = Inactive + Active(file) + Active(anon) + SReclaimable + SwapCached + SUnreclaim + DirectMap4k + Buffers + Unevictable + Mlocked + KernelStack + Writeback + HardwareCorrupted +8: MemTotal = Inactive + Active(file) + Active(anon) + KReclaimable + SwapCached + SUnreclaim + DirectMap4k + Buffers + Unevictable + Mlocked + KernelStack + Writeback + HardwareCorrupted +9: MemTotal = Inactive + Active(file) + Active(anon) + Slab + SwapCached + DirectMap4k + Buffers + Unevictable + Mlocked + KernelStack + Writeback + HardwareCorrupted +10: MemTotal = Active + AnonHugePages + Inactive(anon) + Dirty + DirectMap2M + Slab + SReclaimable + SwapCached + MemFree + SUnreclaim + VmallocUsed + PageTables + Percpu + Mapped + Buffers + Mlocked + Writeback + Hugepagesize + HardwareCorrupted +11: MemTotal = Active + AnonHugePages + Inactive(anon) + Dirty + DirectMap2M + Slab + SReclaimable + SwapCached + MemFree + SUnreclaim + DirectMap4k + VmallocUsed + Unevictable + Mlocked + KernelStack +12: MemTotal = Active + AnonHugePages + Inactive(anon) + Dirty + DirectMap2M + Slab + KReclaimable + SwapCached + MemFree + SUnreclaim + VmallocUsed + PageTables + Percpu + Mapped + Buffers + Mlocked + Writeback + Hugepagesize + HardwareCorrupted +13: MemTotal = Active + AnonHugePages + Inactive(anon) + Dirty + DirectMap2M + Slab + KReclaimable + SwapCached + MemFree + SUnreclaim + DirectMap4k + VmallocUsed + Unevictable + Mlocked + KernelStack +14: MemTotal = Active + AnonHugePages + Active(anon) + DirectMap2M + SReclaimable + DirectMap4k + VmallocUsed + Percpu + Mapped + Shmem + Buffers + Mlocked + KernelStack + Hugepagesize + HardwareCorrupted +15: MemTotal = Active + AnonHugePages + Active(anon) + DirectMap2M + KReclaimable + DirectMap4k + VmallocUsed + Percpu + Mapped + Shmem + Buffers + Mlocked + KernelStack + Hugepagesize + HardwareCorrupted +16: MemTotal = Active + Inactive(file) + Inactive(anon) + SReclaimable + SwapCached + SUnreclaim + DirectMap4k + Buffers + Unevictable + Mlocked + KernelStack + Writeback + HardwareCorrupted +17: MemTotal = Active + Inactive(file) + Inactive(anon) + KReclaimable + SwapCached + SUnreclaim + DirectMap4k + Buffers + Unevictable + Mlocked + KernelStack + Writeback + HardwareCorrupted +18: MemTotal = Active + Inactive(file) + Inactive(anon) + Slab + SwapCached + DirectMap4k + Buffers + Unevictable + Mlocked + KernelStack + Writeback + HardwareCorrupted +19: MemTotal = Active + Inactive + SReclaimable + SwapCached + SUnreclaim + DirectMap4k + Buffers + Unevictable + Mlocked + KernelStack + Writeback + HardwareCorrupted +20: MemTotal = Active + Inactive + KReclaimable + SwapCached + SUnreclaim + DirectMap4k + Buffers + Unevictable + Mlocked + KernelStack + Writeback + HardwareCorrupted +21: MemTotal = Active + Inactive + Slab + SwapCached + DirectMap4k + Buffers + Unevictable + Mlocked + KernelStack + Writeback + HardwareCorrupted +22: MemTotal = Cached + SwapTotal + Inactive(anon) + DirectMap2M + SReclaimable + SwapCached + MemFree + DirectMap4k + PageTables + Percpu + KernelStack + Writeback + HardwareCorrupted +23: MemTotal = Cached + SwapTotal + Inactive(anon) + DirectMap2M + KReclaimable + SwapCached + MemFree + DirectMap4k + PageTables + Percpu + KernelStack + Writeback + HardwareCorrupted +24: MemTotal = Cached + SwapTotal + Inactive(anon) + Dirty + SwapCached + SUnreclaim + Percpu + HardwareCorrupted +25: MemTotal = Cached + Active(anon) + Inactive(anon) + SReclaimable + SwapCached + SUnreclaim + PageTables + Percpu + Mapped + Buffers + KernelStack + HardwareCorrupted +26: MemTotal = Cached + Active(anon) + Inactive(anon) + KReclaimable + SwapCached + SUnreclaim + PageTables + Percpu + Mapped + Buffers + KernelStack + HardwareCorrupted +27: MemTotal = Cached + Active(anon) + Inactive(anon) + Slab + SwapCached + PageTables + Percpu + Mapped + Buffers + KernelStack + HardwareCorrupted +28: MemTotal = MemAvailable + SwapTotal + Inactive(anon) + DirectMap2M + KReclaimable + SReclaimable + SwapCached + Buffers + Hugepagesize +29: MemTotal = CommitLimit + Active(anon) + Inactive(anon) + SUnreclaim + VmallocUsed + Mapped + Shmem + KernelStack + Hugepagesize + HardwareCorrupted +30: DirectMap1G = AnonPages + Active(file) + AnonHugePages + Dirty + DirectMap2M + Slab + KReclaimable + SReclaimable + MemFree + DirectMap4k + VmallocUsed + Mapped + Shmem + Buffers + Unevictable + Mlocked + KernelStack + Hugepagesize + HardwareCorrupted +31: DirectMap1G = Inactive(file) + Active(file) + SwapTotal + Inactive(anon) + DirectMap2M + SReclaimable + SUnreclaim + VmallocUsed + Percpu + Mapped + Shmem + Writeback + HardwareCorrupted +32: DirectMap1G = Inactive(file) + Active(file) + SwapTotal + Inactive(anon) + DirectMap2M + KReclaimable + SUnreclaim + VmallocUsed + Percpu + Mapped + Shmem + Writeback + HardwareCorrupted +33: DirectMap1G = Inactive(file) + Active(file) + SwapTotal + Inactive(anon) + DirectMap2M + Slab + VmallocUsed + Percpu + Mapped + Shmem + Writeback + HardwareCorrupted +34: DirectMap1G = Inactive(file) + Active(file) + Active(anon) + Inactive(anon) + SReclaimable + DirectMap4k + VmallocUsed + Shmem + Buffers + KernelStack + Writeback +35: DirectMap1G = Inactive(file) + Active(file) + Active(anon) + Inactive(anon) + KReclaimable + DirectMap4k + VmallocUsed + Shmem + Buffers + KernelStack + Writeback +36: DirectMap1G = Inactive + Active(file) + SwapTotal + DirectMap2M + SReclaimable + SUnreclaim + VmallocUsed + Percpu + Mapped + Shmem + Writeback + HardwareCorrupted +37: DirectMap1G = Inactive + Active(file) + SwapTotal + DirectMap2M + KReclaimable + SUnreclaim + VmallocUsed + Percpu + Mapped + Shmem + Writeback + HardwareCorrupted +38: DirectMap1G = Inactive + Active(file) + SwapTotal + DirectMap2M + Slab + VmallocUsed + Percpu + Mapped + Shmem + Writeback + HardwareCorrupted +39: DirectMap1G = Inactive + Active(file) + Active(anon) + SReclaimable + DirectMap4k + VmallocUsed + Shmem + Buffers + KernelStack + Writeback +40: DirectMap1G = Inactive + Active(file) + Active(anon) + KReclaimable + DirectMap4k + VmallocUsed + Shmem + Buffers + KernelStack + Writeback +41: DirectMap1G = Active + Active(file) + Inactive(anon) + KReclaimable + SReclaimable + SwapCached + MemFree + SUnreclaim + DirectMap4k + Mapped + Unevictable + KernelStack + Writeback + Hugepagesize + HardwareCorrupted +42: DirectMap1G = Active + Active(file) + Inactive(anon) + Slab + SReclaimable + SwapCached + MemFree + DirectMap4k + Mapped + Unevictable + KernelStack + Writeback + Hugepagesize + HardwareCorrupted +43: DirectMap1G = Active + Active(file) + Inactive(anon) + Slab + KReclaimable + SwapCached + MemFree + DirectMap4k + Mapped + Unevictable + KernelStack + Writeback + Hugepagesize + HardwareCorrupted +44: DirectMap1G = Active + Inactive(file) + Inactive(anon) + SReclaimable + DirectMap4k + VmallocUsed + Shmem + Buffers + KernelStack + Writeback +45: DirectMap1G = Active + Inactive(file) + Inactive(anon) + KReclaimable + DirectMap4k + VmallocUsed + Shmem + Buffers + KernelStack + Writeback +46: DirectMap1G = Active + Inactive + SReclaimable + DirectMap4k + VmallocUsed + Shmem + Buffers + KernelStack + Writeback +47: DirectMap1G = Active + Inactive + KReclaimable + DirectMap4k + VmallocUsed + Shmem + Buffers + KernelStack + Writeback +48: DirectMap1G = Cached + AnonHugePages + Dirty + DirectMap2M + KReclaimable + SReclaimable + SUnreclaim + DirectMap4k + VmallocUsed + PageTables + Percpu + Unevictable + KernelStack + Hugepagesize + HardwareCorrupted +49: DirectMap1G = Cached + AnonHugePages + Dirty + DirectMap2M + Slab + SReclaimable + DirectMap4k + VmallocUsed + PageTables + Percpu + Unevictable + KernelStack + Hugepagesize + HardwareCorrupted +50: DirectMap1G = Cached + AnonHugePages + Dirty + DirectMap2M + Slab + KReclaimable + DirectMap4k + VmallocUsed + PageTables + Percpu + Unevictable + KernelStack + Hugepagesize + HardwareCorrupted +51: DirectMap1G = Cached + Active(file) + KReclaimable + SReclaimable + MemFree + SUnreclaim + DirectMap4k + PageTables + Percpu + Shmem + Mlocked + KernelStack + HardwareCorrupted +52: DirectMap1G = Cached + Active(file) + Slab + SReclaimable + MemFree + DirectMap4k + PageTables + Percpu + Shmem + Mlocked + KernelStack + HardwareCorrupted +53: DirectMap1G = Cached + Active(file) + Slab + KReclaimable + MemFree + DirectMap4k + PageTables + Percpu + Shmem + Mlocked + KernelStack + HardwareCorrupted +54: DirectMap1G = Cached + Inactive(file) + SwapCached + VmallocUsed + Shmem + Buffers + KernelStack + Writeback + Hugepagesize +55: DirectMap1G = MemAvailable + AnonPages + SReclaimable + SwapCached + VmallocUsed + Mapped + Mlocked + KernelStack + Writeback + HardwareCorrupted +56: DirectMap1G = MemAvailable + AnonPages + KReclaimable + SwapCached + VmallocUsed + Mapped + Mlocked + KernelStack + Writeback + HardwareCorrupted +57: Committed_AS = AnonHugePages + Active(anon) + SwapTotal + Dirty + DirectMap2M + Slab + MemFree + SUnreclaim + DirectMap4k + VmallocUsed + PageTables + Percpu + Mapped + Unevictable + Mlocked + Writeback + Hugepagesize +58: Committed_AS = Active(file) + SwapTotal + Inactive(anon) + Dirty + DirectMap2M + SReclaimable + MemFree + DirectMap4k + PageTables + Percpu + Mapped + Shmem + Buffers + Unevictable + Mlocked + KernelStack + Writeback + HardwareCorrupted +59: Committed_AS = Active(file) + SwapTotal + Inactive(anon) + Dirty + DirectMap2M + KReclaimable + MemFree + DirectMap4k + PageTables + Percpu + Mapped + Shmem + Buffers + Unevictable + Mlocked + KernelStack + Writeback + HardwareCorrupted +60: Committed_AS = AnonPages + SwapTotal + Inactive(anon) + Dirty + DirectMap2M + SUnreclaim + VmallocUsed + Percpu + Mapped + Shmem + Buffers + Mlocked + KernelStack + Writeback + Hugepagesize + HardwareCorrupted +61: Committed_AS = Inactive(file) + SwapTotal + Inactive(anon) + Dirty + Slab + KReclaimable + SReclaimable + SUnreclaim + DirectMap4k + PageTables + Shmem + Unevictable + Mlocked + KernelStack + Hugepagesize +62: Committed_AS = Inactive + Inactive(anon) + Dirty + DirectMap2M + Slab + SwapCached + MemFree + SUnreclaim + VmallocUsed + PageTables + Percpu + Mapped + Buffers + Unevictable + Mlocked + HardwareCorrupted +63: Committed_AS = Inactive + SwapTotal + Dirty + Slab + KReclaimable + SReclaimable + SUnreclaim + DirectMap4k + PageTables + Shmem + Unevictable + Mlocked + KernelStack + Hugepagesize +64: Committed_AS = Cached + DirectMap2M + Slab + MemFree + SUnreclaim + DirectMap4k + Shmem + Buffers + Unevictable + Mlocked + KernelStack + Writeback + Hugepagesize + HardwareCorrupted +65: Committed_AS = CommitLimit + DirectMap2M + SwapCached + VmallocUsed + Percpu + Mapped + Shmem + Mlocked + Writeback + Hugepagesize +66: CommitLimit = AnonHugePages + Active(anon) + SwapTotal + Dirty + SwapCached + MemFree + DirectMap4k + VmallocUsed + Percpu + Mapped + Shmem + KernelStack +67: CommitLimit = Active(file) + AnonHugePages + Dirty + DirectMap2M + Slab + SwapCached + MemFree + SUnreclaim + DirectMap4k + PageTables + Mapped + KernelStack + Writeback + Hugepagesize +68: CommitLimit = Inactive(file) + SwapTotal + Inactive(anon) + Slab + KReclaimable + SReclaimable + SwapCached + DirectMap4k + Percpu + Buffers + Mlocked + KernelStack + Writeback +69: CommitLimit = Inactive + SwapTotal + Slab + KReclaimable + SReclaimable + SwapCached + DirectMap4k + Percpu + Buffers + Mlocked + KernelStack + Writeback +70: CommitLimit = Cached + SwapCached + MemFree + VmallocUsed + Mapped + Shmem + Unevictable + Mlocked + Writeback + HardwareCorrupted +71: MemAvailable = AnonPages + AnonHugePages + Dirty + DirectMap2M + MemFree + DirectMap4k + VmallocUsed + Mapped + Unevictable + KernelStack + Writeback + HardwareCorrupted +72: MemAvailable = Inactive(file) + SwapTotal + Inactive(anon) + SReclaimable + SwapCached + MemFree + SUnreclaim + VmallocUsed + Percpu + Mapped + Hugepagesize + HardwareCorrupted +73: MemAvailable = Inactive(file) + SwapTotal + Inactive(anon) + KReclaimable + SwapCached + MemFree + SUnreclaim + VmallocUsed + Percpu + Mapped + Hugepagesize + HardwareCorrupted +74: MemAvailable = Inactive(file) + SwapTotal + Inactive(anon) + Slab + SwapCached + MemFree + VmallocUsed + Percpu + Mapped + Hugepagesize + HardwareCorrupted +75: MemAvailable = Inactive(file) + Active(file) + PageTables + Percpu + Shmem + Buffers + Mlocked + KernelStack + Hugepagesize +76: MemAvailable = Inactive + SwapTotal + SReclaimable + SwapCached + MemFree + SUnreclaim + VmallocUsed + Percpu + Mapped + Hugepagesize + HardwareCorrupted +77: MemAvailable = Inactive + SwapTotal + KReclaimable + SwapCached + MemFree + SUnreclaim + VmallocUsed + Percpu + Mapped + Hugepagesize + HardwareCorrupted +78: MemAvailable = Inactive + SwapTotal + Slab + SwapCached + MemFree + VmallocUsed + Percpu + Mapped + Hugepagesize + HardwareCorrupted +79: Cached = AnonPages + SwapTotal + Inactive(anon) + Slab + SwapCached + MemFree + SUnreclaim + DirectMap4k + VmallocUsed + Percpu + Shmem + Buffers + KernelStack +80: Cached = AnonPages + AnonHugePages + Dirty + DirectMap2M + SUnreclaim + VmallocUsed + Percpu + Mlocked + KernelStack + Writeback + HardwareCorrupted +81: Active = Active(anon) + SwapTotal + Inactive(anon) + SwapCached + MemFree + SUnreclaim + DirectMap4k + VmallocUsed + PageTables + Percpu + Mlocked + Writeback + Hugepagesize +82: Inactive = AnonHugePages + Inactive(anon) + Dirty + DirectMap2M + Slab + SUnreclaim + PageTables + Shmem + Unevictable + KernelStack +83: Inactive(file) = AnonHugePages + Dirty + DirectMap2M + Slab + SUnreclaim + PageTables + Shmem + Unevictable + KernelStack +84: Active(file) = SwapTotal + Inactive(anon) + SwapCached + MemFree + SUnreclaim + DirectMap4k + VmallocUsed + PageTables + Percpu + Mlocked + Writeback + Hugepagesize valid sums (5 sums): -[{'total': 'Active', 'components': ['Active(file)', 'Active(anon)']}, {'total': 'Inactive', 'components': ['Inactive(file)', 'Inactive(anon)']}, {'total': 'Slab', 'components': ['SReclaimable', 'SUnreclaim']}, {'total': 'Slab', 'components': ['KReclaimable', 'SUnreclaim']}, {'total': 'KReclaimable', 'components': ['SReclaimable']}] +0: Active = Active(file) + Active(anon) +1: Inactive = Inactive(file) + Inactive(anon) +2: Slab = SReclaimable + SUnreclaim +3: Slab = KReclaimable + SUnreclaim +4: KReclaimable = SReclaimable last command status : [0] ``` diff --git a/src/expe003.py b/src/expe003.py index 98c9c2d..ea8510f 100755 --- a/src/expe003.py +++ b/src/expe003.py @@ -1,22 +1,22 @@ #!/usr/bin/env python3 from pathlib import Path -from sumfinder import load_sums, remove_invalid_sums +from sumfinder import Sums from linuxmem import read_meminfo_stdout def main(): - sums = load_sums(Path('../expe001.5/alambix97-meminfo-sums.json')) - print(f'starting sums ({len(sums)} sums):') - print(sums) + sums = Sums.load(Path('../expe001.5/alambix97-meminfo-sums.json')) + print(f'starting sums ({sums.get_num_equations()} sums):') + sums.print() variables = read_meminfo_stdout(Path('../bug3897/alambix98/20240806-223916-meminfo.stdout')) # variables = read_meminfo_stdout(Path('../bug3897/alambix97/20240805-191606-meminfo.stdout')) - (valid_sums, invalid_sums) = remove_invalid_sums(sums, variables) - print(f'invalid sums ({len(invalid_sums)} sums):') - print(invalid_sums) + (valid_sums, invalid_sums) = sums.validate_on_variables(variables) + print(f'invalid sums ({invalid_sums.get_num_equations()} sums):') + invalid_sums.print() - print(f'valid sums ({len(valid_sums)} sums):') - print(valid_sums) + print(f'valid sums ({valid_sums.get_num_equations()} sums):') + valid_sums.print() main() diff --git a/src/sumfinder/__init__.py b/src/sumfinder/__init__.py index 128f0b5..846245f 100644 --- a/src/sumfinder/__init__.py +++ b/src/sumfinder/__init__.py @@ -1,7 +1,5 @@ from .sumfinder import Sums # noqa from .sumfinder import SumExporter # noqa -from .sumfinder import load_sums # noqa from .sumfinder import find_sums # noqa from .sumfinder import sums_to_dot # noqa from .sumfinder import find_and_graph_sums # noqa -from .sumfinder import remove_invalid_sums # noqa diff --git a/src/sumfinder/sumfinder.py b/src/sumfinder/sumfinder.py index bf45079..5c6cf02 100755 --- a/src/sumfinder/sumfinder.py +++ b/src/sumfinder/sumfinder.py @@ -9,7 +9,7 @@ import subprocess VarName = str VarValue = int -Sums = List[Dict[VarName, List[VarName]]] +Sum = Dict[VarName, List[VarName]] class IntVariable(): @@ -24,6 +24,66 @@ class IntVariable(): return f'{self.name}: {self.value}' +class Sums(): + + variables: Set[IntVariable] + sums: List[Sum] + + def __init__(self) -> None: + self.variables = set() + self.sums = [] + + def get_num_variables(self): + return len(self.variables) + + def get_num_equations(self): + return len(self.sums) + + @staticmethod + def load(sums_file_path: Path) -> 'Sums': + sums = Sums() + with open(sums_file_path, 'rt', encoding='utf8') as sums_file: + root_dict = json.loads(sums_file.read()) + assert root_dict['format'] == 'sums-v001' + sums.sums = root_dict['sums'] + sums.variables = {IntVariable(var_id, var_value) for var_id, var_value in root_dict['variables'].items()} + return sums + + def save(self, sums_file_path: Path): + root_dict = {} + root_dict['format'] = 'sums-v001' + root_dict['variables'] = {var.name: var.value for var in self.variables} + root_dict['sums'] = self.sums + sums_file_path.write_text(json.dumps(root_dict)) + + def print(self): + equation_index = 0 + for s in self.sums: + print(f"{equation_index}: {s['total']} = {' + '.join([comp_id for comp_id in s['components']])}") + equation_index += 1 + + def validate_on_variables(self, variables: Dict[VarName, VarValue]) -> Tuple['Sums', 'Sums']: + """ + returns the tuple valid_sums, invalid_sums after checking each of the sum of input_sum againts the given variables + """ + valid_sums: Sums = Sums() + invalid_sums: Sums = Sums() + for _sum in self.sums: + # for total_var_id, components in input_sums.items(): + total_var_id = _sum['total'] + components = _sum['components'] + + computed_total_value = 0 + for component_var_id in components: + computed_total_value += variables[component_var_id] + real_total_value = variables[total_var_id] + if computed_total_value == real_total_value: + valid_sums.sums.append(_sum) + else: + invalid_sums.sums.append(_sum) + return (valid_sums, invalid_sums) + + class ISumHandler(abc.ABC): @abc.abstractmethod @@ -48,35 +108,23 @@ class SumExporter(ISumHandler): '''handler that exports the sums as a graphviz dot file ''' sum_file_path: Path - variables: Set[IntVariable] sums: Sums def __init__(self, sum_file_path: Path): self.sum_file_path = sum_file_path self.variables = set() - self.sums = [] + self.sums = Sums() def on_sum_found(self, total: IntVariable, components: List[IntVariable]): - self.variables.add(total) + self.sums.variables.add(total) for component in components: - self.variables.add(component) + self.sums.variables.add(component) print(f"sum found: {total.name} = {' + '.join([comp.name for comp in components])}") - self.sums.append({'total': total.name, 'components': [comp.name for comp in components]}) + self.sums.sums.append({'total': total.name, 'components': [comp.name for comp in components]}) def on_end(self): print(f'exporting sums to {self.sum_file_path}') - root_dict = {} - root_dict['format'] = 'sums-v001' - root_dict['variables'] = {var.name: var.value for var in self.variables} - root_dict['sums'] = self.sums - self.sum_file_path.write_text(json.dumps(root_dict)) - - -def load_sums(sums_file_path: Path) -> Sums: - with open(sums_file_path, 'rt', encoding='utf8') as sums_file: - root_dict = json.loads(sums_file.read()) - assert root_dict['format'] == 'sums-v001' - return root_dict['sums'] + self.sums.save(self.sum_file_path) def explore(total: IntVariable, components: List[IntVariable], cur_sum: VarValue, cur_var_index: int, contrib_components: List[IntVariable], sum_handler: ISumHandler): @@ -266,12 +314,8 @@ def sums_to_dot(sum_file_path: Path, dot_file_path: Path): "yellowgreen"] print(f'creating {dot_file_path} from {sum_file_path}') - with open(sum_file_path, 'rt', encoding='utf8') as sum_file: - root_dict = json.load(sum_file) + sums = Sums.load(sum_file_path) # print(root_dict) - variables = {IntVariable(var_name, var_value) for var_name, var_value in root_dict['variables'].items()} - # print(variables) - sums = root_dict['sums'] # print(sums) with open(dot_file_path, 'wt+', encoding='utf8') as dot_file: dot_file.write(f'digraph {to_dot_symbol(sum_file_path.stem)}\n') @@ -279,10 +323,10 @@ def sums_to_dot(sum_file_path: Path, dot_file_path: Path): dot_file.write('layout = neato\n') dot_file.write('overlap = false\n') - for variable in variables: + for variable in sums.variables: dot_file.write(f'{to_dot_symbol(variable.name)} [label="{variable.name}={variable.value}"];\n') sum_index = 0 - for s in sums: + for s in sums.sums: dot_file.write(f"{to_dot_symbol(s['total'])} -> {{{','.join([to_dot_symbol(comp) for comp in s['components']])}}} [color={svg_colors[sum_index % len(svg_colors)]}, label={sum_index}];\n") sum_index += 1 dot_file.write('}\n') @@ -298,25 +342,3 @@ def find_and_graph_sums(variables: Dict[str, int], set_id: str): sums_to_dot(sums_file_path, dot_file_path) print(f'creating {svg_file_path} from {dot_file_path}') subprocess.run(f'dot -Tsvg {dot_file_path} > {svg_file_path}', shell=True, check=True) - - -def remove_invalid_sums(input_sums: Sums, variables: Dict[VarName, VarValue]) -> Tuple[Sums, Sums]: - """ - returns the tuple valid_sums, invalid_sums after checking each of the sum of input_sum againts the given variables - """ - valid_sums: Sums = [] - invalid_sums: Sums = [] - for _sum in input_sums: - # for total_var_id, components in input_sums.items(): - total_var_id = _sum['total'] - components = _sum['components'] - - computed_total_value = 0 - for component_var_id in components: - computed_total_value += variables[component_var_id] - real_total_value = variables[total_var_id] - if computed_total_value == real_total_value: - valid_sums.append(_sum) - else: - invalid_sums.append(_sum) - return (valid_sums, invalid_sums)