From 454353ce921344c5653c1f80aaf808f614572fd1 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Wed, 28 Sep 2016 18:23:39 +0200 Subject: mem: add .keys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/plugins/mem.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/plugins') diff --git a/src/plugins/mem.py b/src/plugins/mem.py index 03e0a2e..17d293f 100644 --- a/src/plugins/mem.py +++ b/src/plugins/mem.py @@ -37,6 +37,7 @@ class Memory: @variable shmem:int? Amount of memory allocated as shared memory, in KB @variable slab:int? In-kernel data structures cache, in KB @variable hardware_corrupted:int? Hardware corrupted memory, in KB + @variable keys:frozenset List of all keys ''' @@ -55,6 +56,8 @@ class Memory: line = filter(lambda x : not x == '', line.replace(':', ' ').split(' ')) line = list(line)[:2] self.__info[line[0]] = int(line[1]) + + self.keys = self.__info.keys() self.mem_total = self['MemTotal'] self.mem_free = self['MemFree'] -- cgit v1.2.3-70-g09d2