From 1fa57228447abc46d58bcc377ab373c026ccd008 Mon Sep 17 00:00:00 2001 From: Philip Knirsch Date: Wed, 25 Feb 2009 11:28:06 +0100 Subject: - Add init() methods to each plugin - Call plugin init() methods during tuned's init() - Add support for command line parameters o -c conffile|--config==conffile to specify the location of the config file o -d to start tuned as a daemon (instead of as normal app) - Readded the debug output in case tuned isn't started as as daemon - Fixed initialization of max transfer values for net tuning plugin --- monitorplugins/disk.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'monitorplugins/disk.py') diff --git a/monitorplugins/disk.py b/monitorplugins/disk.py index f2844e8..16262ab 100644 --- a/monitorplugins/disk.py +++ b/monitorplugins/disk.py @@ -34,7 +34,7 @@ class DiskMonitor: self.devices[d]["max"] = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1] self.__updateStat__(d) self.devices[d]["max"] = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1] - #print self.devices + print self.devices def __calcdiff__(self, dev): @@ -56,7 +56,10 @@ class DiskMonitor: for dev in self.devices.keys(): self.__updateStat__(dev) self.devices[dev]["diff"] = self.__calcdiff__(dev) - + + def init(self, config): + self.config = config + def getLoad(self): self.__update__() ret = {} -- cgit