From 1595a60118b4517010e4a9908bb164b9e9b391c4 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Mon, 3 Oct 2016 05:47:31 +0200 Subject: softirqs: 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/softirqs.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/plugins/softirqs.py b/src/plugins/softirqs.py index 0471bda..1413cb1 100644 --- a/src/plugins/softirqs.py +++ b/src/plugins/softirqs.py @@ -23,6 +23,8 @@ from util import * class SoftIRQs: ''' Data from /proc/softirqs + + @variable keys:list List of avaiable keys ''' @@ -39,8 +41,10 @@ class SoftIRQs: softirqs = map(lambda x : x.split(' '), filter_(softirqs.split('\n')[1:])) self.__info = {} + self.keys = [] for line in softirqs: self.__info[line[0][:-1]] = [int(x) for x in line[1:]] + self.keys.append(line[0]) def __contains__(self, key): -- cgit v1.2.3-70-g09d2