(self)
return []
Set the cpu affinity string for container run command
Set the cpu affinity string for container run command
Set the cpu affinity string for container run command
def _set_cpu_affinity(self):
        """Set the cpu affinity string for container run command"""
        # find set affinity executable
        if not self.opt["cpuset"]:
            return []
        exec_cmd = []
        for exec_cmd in Config.conf['cpu_affinity_exec_tools']:
            exec_name = \
                FileUtil(exec_cmd[0]).find_exec()
            if exec_name:
                exec_cmd[0] = exec_name
                for (index, arg) in enumerate(exec_cmd):
                    if arg == "%s":
                        exec_cmd[index] = self.opt["cpuset"]
                return exec_cmd
        self.opt["cpuset"] = ""
        return []
def _set_cpu_affinity ( self ) : # find set affinity executable if not self . opt [ "cpuset" ] : return [ ] exec_cmd = [ ] for exec_cmd in Config . conf [ 'cpu_affinity_exec_tools' ] : exec_name = FileUtil ( exec_cmd [ 0 ] ) . find_exec ( ) if exec_name : exec_cmd [ 0 ] = exec_name for ( index , arg ) in enumerate ( exec_cmd ) : if arg == "%s" : exec_cmd [ index ] = self . opt [ "cpuset" ] return exec_cmd self . opt [ "cpuset" ] = "" return [ ]