diff options
author | Philip Knirsch <pknirsch@hamburg.stuttgart.redhat.com> | 2009-02-25 11:28:06 +0100 |
---|---|---|
committer | Philip Knirsch <pknirsch@hamburg.stuttgart.redhat.com> | 2009-02-25 11:28:06 +0100 |
commit | 1fa57228447abc46d58bcc377ab373c026ccd008 (patch) | |
tree | 634135e6c1c62729feb2893a38d7b2da0d89784e /monitorplugins/disk.py | |
parent | e393e728bcffd730401780a8fb3d077d952fed78 (diff) | |
download | tuned-1fa57228447abc46d58bcc377ab373c026ccd008.tar.gz tuned-1fa57228447abc46d58bcc377ab373c026ccd008.tar.xz tuned-1fa57228447abc46d58bcc377ab373c026ccd008.zip |
- 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
Diffstat (limited to 'monitorplugins/disk.py')
-rw-r--r-- | monitorplugins/disk.py | 7 |
1 files changed, 5 insertions, 2 deletions
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 = {} |