Exemplo n.º 1
0
 protected function preparePausePids(PauseDto $pauseDto)
 {
     $pauseStanderArr = $this->getTerminatorPauseStanderArr();
     $pauseStanderArr[TerminatorPauseStanderConstants::PIDS_FOR_PAUSE] = $pauseDto->getPidsForPause();
     return $pauseStanderArr;
 }
Exemplo n.º 2
0
 protected function calculateProcessesNumberToPause()
 {
     $pauseDto = new PauseDto();
     $cpuExceeded = $this->pidsCpuSum - $this->allowingCpuUsage;
     if ($cpuExceeded > 0) {
         $pidsForPause = $this->getPidsForAction($cpuExceeded, LmConstants::CPU, 'pause');
         $this->logActionDueToCpuInfo($cpuExceeded, 'pause');
         $this->logPause();
         $pauseDto->setPidsForPause($pidsForPause);
     }
     return $pauseDto;
 }