def startRamcloud( self, cpu=.6 ): """Start Ramcloud cpu: CPU usage limit (in seconds/s)""" # Create a cgroup so Ramcloud doesn't eat all of our CPU ramcloud = CPULimitedHost( 'ramcloud', inNamespace=False, period_us=5000 ) ramcloud.setCPUFrac( cpu / numCores() ) info( '\n' ) ramcloud.cmd( 'export PATH=%s:$PATH' % self.onosDir ) ramcloud.cmd( 'export ONOS_LOGDIR=%s' % self.logDir ) for daemon in 'coord', 'server': ramcloud.cmd( 'onos.sh rc-%s start' % daemon ) pid = self.waitStart( 'Ramcloud %s' % daemon, 'obj.master/' + daemon ) self.waitNetstat( pid ) status = self.cmd( 'onos.sh rc-%s.sh status' % daemon ) if 'running' not in status: raise Exception( 'Ramcloud %s startup failed: ' % daemon + status ) self.ramcloud = ramcloud
def startRamcloud(self, cpu=.6): """Start Ramcloud cpu: CPU usage limit (in seconds/s)""" # Create a cgroup so Ramcloud doesn't eat all of our CPU ramcloud = CPULimitedHost('ramcloud', inNamespace=False, period_us=5000) ramcloud.setCPUFrac(cpu / numCores()) info('\n') ramcloud.cmd('export PATH=%s:$PATH' % self.onosDir) ramcloud.cmd('export ONOS_LOGDIR=%s' % self.logDir) for daemon in 'coord', 'server': ramcloud.cmd('onos.sh rc-%s start' % daemon) pid = self.waitStart('Ramcloud %s' % daemon, 'obj.master/' + daemon) self.waitNetstat(pid) status = self.cmd('onos.sh rc-%s.sh status' % daemon) if 'running' not in status: raise Exception('Ramcloud %s startup failed: ' % daemon + status) self.ramcloud = ramcloud