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 --- tuningplugins/net.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'tuningplugins/net.py') diff --git a/tuningplugins/net.py b/tuningplugins/net.py index 3983b8d..687d306 100644 --- a/tuningplugins/net.py +++ b/tuningplugins/net.py @@ -33,6 +33,9 @@ class NetTuning: idle.setdefault(type, 0) idle[type] = 0 + def init(self, config): + self.config = config + def setTuning(self, load): disks = load.setdefault("NET", {}) for dev in disks.keys(): @@ -44,6 +47,6 @@ class NetTuning: if self.devidle[dev]["LEVEL"] > 0 and (self.devidle[dev]["READ"] == 0 or self.devidle[dev]["WRITE"] == 0): self.devidle[dev]["LEVEL"] = 0 os.system("ethtool -s "+dev+" advertise 0x03F") - #print(load, self.devidle) + print(load, self.devidle) _plugin = NetTuning() -- cgit