diff options
Diffstat (limited to 'src/lib/Bcfg2/Server/Core.py')
-rw-r--r-- | src/lib/Bcfg2/Server/Core.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/lib/Bcfg2/Server/Core.py b/src/lib/Bcfg2/Server/Core.py index dc29f45eb..4ff0d2b98 100644 --- a/src/lib/Bcfg2/Server/Core.py +++ b/src/lib/Bcfg2/Server/Core.py @@ -14,6 +14,7 @@ import Bcfg2.settings import Bcfg2.Server import Bcfg2.Logger import Bcfg2.Server.FileMonitor +from Bcfg2.Statistics import Statistics from Bcfg2.Compat import xmlrpclib, reduce from Bcfg2.Server.Plugin import PluginInitError, PluginExecutionError @@ -174,6 +175,8 @@ class BaseCore(object): self.fam_thread.start() self.fam.AddMonitor(self.cfile, self.setup) + self.instance_statistics = Statistics() + def plugins_by_type(self, base_cls): """Return a list of loaded plugins that match the passed type. @@ -638,3 +641,7 @@ class BaseCore(object): """Is the database configured and available""" return self._database_available + @exposed + def get_statistics(self, _): + """Get current statistics about component execution""" + return self.instance_statistics.display() |