diff options
Diffstat (limited to 'tuned.py')
-rw-r--r-- | tuned.py | 13 |
1 files changed, 10 insertions, 3 deletions
@@ -1,9 +1,11 @@ -import time,os,locale +import time,os,locale,ConfigParser class Tuned: def __init__(self): self.mp = [] self.tp = [] + self.config = ConfigParser.ConfigParser() + self.config.read('/etc/tuned.conf') def __initplugins__(self, path, module, store): _files = map(lambda v: v[:-3], filter(lambda v: v[-3:] == ".py" and \ @@ -21,9 +23,13 @@ class Tuned: def init(self, path): self.__initplugins__(path, "monitorplugins", self.mp) self.__initplugins__(path, "tuningplugins", self.tp) + for p in self.mp: + p.config = self.config + for p in self.tp: + p.config = self.config def run(self): - print("Running...") + #print("Running...") while True: lh = {} for p in self.mp: @@ -33,6 +39,7 @@ class Tuned: time.sleep(10) def cleanup(self): - print("Cleanup...") + pass + #print("Cleanup...") tuned = Tuned() |