parsl.monitoring.MonitoringHub

class parsl.monitoring.MonitoringHub(hub_address: str, hub_port: Optional[int] = None, hub_port_range: Tuple[int, int] = (55050, 56000), client_address: str = '127.0.0.1', client_port_range: Tuple[int, int] = (55000, 56000), workflow_name: Optional[str] = None, workflow_version: Optional[str] = None, logging_endpoint: str = 'sqlite:///runinfo/monitoring.db', logdir: Optional[str] = None, monitoring_debug: bool = False, resource_monitoring_enabled: bool = True, resource_monitoring_interval: float = 30)[source]
__init__(hub_address: str, hub_port: Optional[int] = None, hub_port_range: Tuple[int, int] = (55050, 56000), client_address: str = '127.0.0.1', client_port_range: Tuple[int, int] = (55000, 56000), workflow_name: Optional[str] = None, workflow_version: Optional[str] = None, logging_endpoint: str = 'sqlite:///runinfo/monitoring.db', logdir: Optional[str] = None, monitoring_debug: bool = False, resource_monitoring_enabled: bool = True, resource_monitoring_interval: float = 30)[source]
Parameters
  • hub_address (str) – The ip address at which the workers will be able to reach the Hub.

  • hub_port (int) – The UDP port to which workers will be able to deliver messages to the monitoring router. Note that despite the similar name, this is not related to hub_port_range. Default: None

  • hub_port_range (tuple(int, int)) – The port range for a ZMQ channel from an executor process (for example, the interchange in the High Throughput Executor) to deliver monitoring messages to the monitoring router. Note that despite the similar name, this is not related to hub_port. Default: (55050, 56000)

  • client_address (str) – The ip address at which the dfk will be able to reach Hub. Default: “127.0.0.1”

  • client_port_range (tuple(int, int)) – The MonitoringHub picks ports at random from the range which will be used by Hub. Default: (55000, 56000)

  • workflow_name (str) – The name for the workflow. Default to the name of the parsl script

  • workflow_version (str) – The version of the workflow. Default to the beginning datetime of the parsl script

  • logging_endpoint (str) – The database connection url for monitoring to log the information. These URLs follow RFC-1738, and can include username, password, hostname, database name. Default: ‘sqlite:///monitoring.db’

  • logdir (str) – Parsl log directory paths. Logs and temp files go here. Default: ‘.’

  • monitoring_debug (Bool) – Enable monitoring debug logging. Default: False

  • resource_monitoring_enabled (boolean) – Set this field to True to enable logging of information from the worker side. This will include environment information such as start time, hostname and block id, along with periodic resource usage of each task. Default: True

  • resource_monitoring_interval (float) – The time interval, in seconds, at which the monitoring records the resource usage of each task. Default: 30 seconds

Methods

__init__(hub_address[, hub_port, ...])

param hub_address

The ip address at which the workers will be able to reach the Hub.

close()

monitor_wrapper(f, args, kwargs, try_id, ...)

send(mtype, message)

start(run_id, run_dir)

close() None[source]
static monitor_wrapper(f: Any, args: List, kwargs: Dict, try_id: int, task_id: int, monitoring_hub_url: str, run_id: str, logging_level: int, sleep_dur: float, radio_mode: str, monitor_resources: bool, run_dir: str) Tuple[Callable, List, Dict][source]
send(mtype: parsl.monitoring.message_type.MessageType, message: Any) None[source]
start(run_id: str, run_dir: str) int[source]