Exemplo n.º 1
0
 def runForkStatWithDuration(self, forkStatType, duration):
     cmd = "forkstat -l -e {} -D {} > {}"
     cmd = cmd.format(forkStatType, duration, self.tmpFile)
     self.proc = util.runCommandWithoutWait(cmd)
     if ( not self.proc ):
         self.logger.error("%s failed: %s", cmd, err)
         return False
     return True
Exemplo n.º 2
0
 def runSysdigWithDuration(self, eventType, duration):
     cmd = "sysdig evt.type={} -M {} -w {}"
     cmd = cmd.format(eventType, duration, self.tmpFile)
     self.proc = util.runCommandWithoutWait(cmd)
     if (not self.proc):
         self.logger.error("%s failed: %s", cmd, err)
         return False
     return True
Exemplo n.º 3
0
 def runInAttachedMode(self):
     self.logger.debug("Running container in attached mode %s", self.imageName)
     cmd = "sudo docker {} run -l {} --name {} {} -it {} {}"
     cmd = cmd.format(self.remote, C.TOOLNAME, self.containerName, self.options, self.imageName, self.args)
     proc = util.runCommandWithoutWait(cmd)
     if ( not proc ):
         self.logger.error("Error running docker in attached mode: %s", err)
         return False
     self.containerId = self.containerName
     return True