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)
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)