logstatisticsagent.agent module

class logstatisticsagent.agent.LogStatisticsAgent(config, **kwargs)[source]

Bases: volttron.platform.vip.agent.Agent

LogStatisticsAgent reads volttron.log file size every hour, compute the size delta from previous hour and publish the difference with timestamp. It also publishes standard deviation every 24 hours. :param config: Configuration dict :type config: dict Example configuration: .. code-block:: python

{ “file_path” : “/home/volttron/volttron.log”, “analysis_interval_sec” : 60, “publish_topic” : “platform/log_statistics”, “historian_topic” : “analysis/log_statistics” }


Publishes file’s size increment in previous time interval (60 minutes) with timestamp. Also publishes standard deviation of file’s hourly size differences every 24 hour.

starting(sender, **kwargs)[source]
logstatisticsagent.agent.log_statistics(config_path, **kwargs)[source]

Load the LogStatisticsAgent agent configuration and returns and instance of the agent created using that configuration. :param config_path: Path to a configuration file. :type config_path: str :returns: LogStatisticsAgent agent instance :rtype: LogStatisticsAgent agent

logstatisticsagent.agent.main(argv=['/home/docs/checkouts/readthedocs.org/user_builds/volttron/envs/develop/lib/python3.6/site-packages/sphinx/__main__.py', '-T', '-E', '-b', 'html', '-d', '_build/doctrees', '-D', 'language=en', '.', '_build/html'])[source]

Main method called by the platform.