From 0974a97516720effe7e7d42154473fe145e3acdc Mon Sep 17 00:00:00 2001 From: Jan Kaluza Date: Thu, 16 Feb 2012 09:28:06 +0100 Subject: [PATCH] Print final config in debug mode --- tuned/controller.py | 2 +- tuned/profile.py | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/tuned/controller.py b/tuned/controller.py index 2496459..f4461be 100644 --- a/tuned/controller.py +++ b/tuned/controller.py @@ -111,7 +111,7 @@ class Controller(exports.interfaces.ExportableInterface): @exports.export("", "s") def active_profile(self): - return self.config_file.split("/")[-2] + return "default" @exports.export("", "a{bb}") def status(self): diff --git a/tuned/profile.py b/tuned/profile.py index 0c4f78e..10aa3ab 100644 --- a/tuned/profile.py +++ b/tuned/profile.py @@ -25,6 +25,7 @@ import threading import ConfigParser import glob from subprocess import * +import pprint import tuned.plugins @@ -109,6 +110,9 @@ class Profile(object): self._plugin_configs[name] = plugin_cfg def _apply_config(self): + pp = pprint.PrettyPrinter(indent=4) + log.debug("Loaded config: %s" % (pp.pformat(self._plugin_configs))) + for name, cfg in self._plugin_configs.iteritems(): plugin = cfg["type"] del cfg["type"]