summaryrefslogtreecommitdiffstats
path: root/tuningplugins/net.py
diff options
context:
space:
mode:
authorPhilip Knirsch <pknirsch@hamburg.stuttgart.redhat.com>2009-02-25 11:28:06 +0100
committerPhilip Knirsch <pknirsch@hamburg.stuttgart.redhat.com>2009-02-25 11:28:06 +0100
commit1fa57228447abc46d58bcc377ab373c026ccd008 (patch)
tree634135e6c1c62729feb2893a38d7b2da0d89784e /tuningplugins/net.py
parente393e728bcffd730401780a8fb3d077d952fed78 (diff)
downloadtuned-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 'tuningplugins/net.py')
-rw-r--r--tuningplugins/net.py5
1 files changed, 4 insertions, 1 deletions
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()