示例#1
0
 def test_03_setgroup_add_ins(self):
     """`setgroup_add` and `setgroup_ins` commands"""
     ctrl = LDMSD_Controller(port = self.SMP_PORT, xprt = self.XPRT)
     ctrl.run()
     ctrl.read_pty() # discard the welcome message and the prompt
     cmd = "setgroup_add name=my/grp interval=%(interval)d" % {
                 "interval": self.INTERVAL_US,
             }
     lines = ctrl.comm_pty(cmd)
     lines = ctrl.comm_pty("setgroup_ins name=my/grp instance=smp/meminfo,smp/set7")
     time.sleep(3 * self.INTERVAL_SEC)
     self._verify_smp()
     self._verify_agg(["smp/meminfo", "smp/set7"])
示例#2
0
 def test_04_setgroup_rm(self):
     """`setgroup_rm` test"""
     ctrl = LDMSD_Controller(port=self.SMP_PORT, xprt=self.XPRT)
     ctrl.run()
     ctrl.read_pty()  # discard the welcome message and the prompt
     lines = ctrl.comm_pty("setgroup_rm name=my/grp instance=smp/set7")
     time.sleep(3 * self.INTERVAL_SEC)
     self._verify_smp()
     self._verify_agg(["smp/meminfo"])
示例#3
0
 def test_02_empty_grp(self):
     """Empty the plugin group so that we can test the manual group"""
     ctrl = LDMSD_Controller(port=self.SMP_PORT, xprt=self.XPRT)
     ctrl.run()
     ctrl.read_pty()  # discard the welcome message and the prompt
     lines = ctrl.comm_pty("config name=grptest members=0x0")
     self._verify_smp()
     # Now, only set0 and set4 shold be updated on the agg
     self._verify_agg([])
示例#4
0
 def test_01_plugin_mod(self):
     # Now, setup the ldmsd_controller subprocess
     ctrl = LDMSD_Controller(port=self.SMP_PORT, xprt=self.XPRT)
     ctrl.run()
     ctrl.read_pty()  # discard the welcome message and the prompt
     lines = ctrl.comm_pty("config name=grptest members=0x11")
     self._verify_smp()
     # Now, only set0 and set4 shold be updated on the agg
     self._verify_agg(['smp/set0', 'smp/set4'])
示例#5
0
 def test_06_setgroup_del(self):
     ctrl = LDMSD_Controller(port=self.SMP_PORT, xprt=self.XPRT)
     ctrl.run()
     ctrl.read_pty()  # discard the welcome message and the prompt
     cmd = "setgroup_del name=my/grp"
     lines = ctrl.comm_pty(cmd)
     time.sleep(3 * self.INTERVAL_SEC)
     x = LdmsWrap(self.AGG_PORT)
     s = x.get("my/grp")
     self.assertEqual(s, None)
示例#6
0
 def test_05_setgroup_mod(self):
     """`setgroup_mod` test"""
     ctrl = LDMSD_Controller(port=self.SMP_PORT, xprt=self.XPRT)
     ctrl.run()
     ctrl.read_pty()  # discard the welcome message and the prompt
     cmd = "setgroup_mod name=my/grp interval=%d" % (60 * self.INTERVAL_US)
     lines = ctrl.comm_pty(cmd)
     time.sleep(3 * self.INTERVAL_SEC)
     self._verify_smp()
     self._verify_agg([])