diff options
author | Mattias Andrée <maandree@kth.se> | 2016-10-03 13:34:36 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2016-10-03 13:34:36 +0200 |
commit | 98959502be889d9dfa9b2d15adf32ed7b9364b21 (patch) | |
tree | 327e1f8dd00e01bb1aa294f49f7eef29d0202b0e /src/plugins | |
parent | fix snmp (diff) | |
download | xpybar-98959502be889d9dfa9b2d15adf32ed7b9364b21.tar.gz xpybar-98959502be889d9dfa9b2d15adf32ed7b9364b21.tar.bz2 xpybar-98959502be889d9dfa9b2d15adf32ed7b9364b21.tar.xz |
vmstat: add keys
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/vmstat.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/plugins/vmstat.py b/src/plugins/vmstat.py index 4018140..ae661ab 100644 --- a/src/plugins/vmstat.py +++ b/src/plugins/vmstat.py @@ -23,6 +23,8 @@ from util import * class VMStat: ''' Various virtual memory statistics + + @variable keys:list<str> List of avaiable keys ''' @@ -37,8 +39,10 @@ class VMStat: vmstat = map(lambda x : x.split(' '), filter(lambda x : not x == '', vmstat.split('\n'))) self.__info = {} + self.keys = [] for field, value in vmstat: self.__info[field] = int(value) + self.keys.append(field) def __contains__(self, key): |