From 98959502be889d9dfa9b2d15adf32ed7b9364b21 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Mon, 3 Oct 2016 13:34:36 +0200 Subject: vmstat: 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/vmstat.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') 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 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): -- cgit v1.2.3-70-g09d2