Exemplo n.º 1
0
    def __init__(self, settings):
        super().__init__(settings)

        self.partitions = settings.partitions

        self.sampler = IOStat(hosts=self.nodes,
                              workers=self.workers,
                              user=self.ssh_username,
                              password=self.ssh_password)
Exemplo n.º 2
0
class IO(System):

    COLLECTOR = "iostat"

    def __init__(self, settings):
        super().__init__(settings)

        self.partitions = settings.partitions

        self.sampler = IOStat(hosts=self.nodes,
                              workers=self.workers,
                              user=self.ssh_username,
                              password=self.ssh_password)

    def sample(self):
        for node, stats in self.sampler.get_server_samples(
                self.partitions).items():
            self.add_stats(node, stats)

        for node, stats in self.sampler.get_client_samples(
                self.partitions).items():
            self.add_stats(node, stats)