def __init__(self, settings): super().__init__(settings) self.sampler = MemInfo(hosts=self.nodes, workers=self.workers, user=self.ssh_username, password=self.ssh_password)
class Memory(System): COLLECTOR = 'meminfo' def __init__(self, settings): super().__init__(settings) self.sampler = MemInfo(hosts=self.nodes, workers=self.workers, user=self.ssh_username, password=self.ssh_password) def sample(self): for node, stats in self.sampler.get_samples().items(): self.add_stats(node, stats)