Skip to content

Kathara.manager.docker.stats.DockerMachineStats

Tommaso Caiazzi edited this page Mar 18, 2024 · 7 revisions

module Kathara.manager.docker.stats.DockerMachineStats


class DockerMachineStats

The class responsible to handle Docker Machine statistics.

Attributes:

  • machine_api_object (Container): The Docker Container associated with this statistics.
  • stats (Generator[Dict[str, Any], None, None]): A generator containing dicts with the Docker statistics
  • lab_hash (str): The hash identifier of the network scenario of the Docker Container.
  • name (str): The name of the device.
  • container_name (str): The Docker Container Name.
  • user (str): The user that deployed the associated Docker Network.
  • image (str): The Docker Image used for deploying the Docker Container.
  • status (Optional[str]): The status of the Docker Container.
  • pids (Optional[int]): The number of PIDs associated with the Docker Container.
  • cpu_usage (str): The cpu usage of the Docker Container.
  • mem_usage (str): The memory usage of the Docker Container.
  • mem_percent (str): The memory usage of the Docker Container as a percentage.
  • net_usage (str): The network usage of the Docker Container.

method DockerMachineStats.__init__

__init__(machine_api_object: docker.models.containers.Container)

method DockerMachineStats.to_dict

to_dict() → Dict[str, Any]

Transform statistics into a dict representation.

Returns:

  • Dict[str, Any]: Dict containing statistics.

method DockerMachineStats.update

update() → None

Update dynamic statistics with the current ones.

Returns: None


This file was automatically generated via lazydocs.

Clone this wiki locally