sysmon.agent module

class sysmon.agent.SysMonAgent(config, **kwargs)[source]

Bases: volttron.platform.vip.agent.Agent

Monitor utilization of system resources (CPU, memory, disk)

The percent usage of each system resource can be queried via RPC and they are published periodically to configured topics.

Parameters

config (dict) – Configuration dict

Example configuration:

{
    "base_topic": "datalogger/log/platform",
    "cpu_check_interval": 5,
    "memory_check_interval": 5,
    "disk_check_interval": 5,
    "disk_path": "/"
}
cpu_percent()[source]

Return CPU usage percentage

disk_percent()[source]

Return usage of disk mounted at configured path

memory_percent()[source]

Return memory usage percentage

reconfigure(**kwargs)[source]

Reconfigure the agent

start(sender, **kwargs)[source]

Set up periodic publishing of system resource data

sysmon.agent.main(argv=['/home/docs/checkouts/readthedocs.org/user_builds/volttron/envs/releases-8.x/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.

sysmon.agent.sysmon_agent(config_path, **kwargs)[source]

Load the SysMon Agent configuration and returns and instance of the agent created using that configuration.

Parameters

config_path (str) – Path to a configuration file.

Returns

SysMonAgent instance

Return type

SysMonAgent