コード例 #1
0
    def __init__(self, settings):
        super().__init__(settings)

        self.sampler = MemInfo(hosts=self.nodes,
                               workers=self.workers,
                               user=self.ssh_username,
                               password=self.ssh_password)
コード例 #2
0
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)