diff options
author | Mattias Andrée <maandree@kth.se> | 2016-09-28 18:23:39 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2016-09-28 18:23:39 +0200 |
commit | 454353ce921344c5653c1f80aaf808f614572fd1 (patch) | |
tree | 2e73cc1000fc625deb26f55fc0208d697d629373 /src | |
parent | Fix bound checking (diff) | |
download | xpybar-454353ce921344c5653c1f80aaf808f614572fd1.tar.gz xpybar-454353ce921344c5653c1f80aaf808f614572fd1.tar.bz2 xpybar-454353ce921344c5653c1f80aaf808f614572fd1.tar.xz |
mem: add .keys
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r-- | src/plugins/mem.py | 3 |
1 files changed, 3 insertions, 0 deletions
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'] |