예제 #1
0
 public function getMemFree(CpuMemDto $cpuMemDto)
 {
     $commandsDto = new CommandsExecutionDto();
     $commandsDto->setCommandName(CommandsConstants::GET_MEM_FREE);
     /**
      * @var CpuMemDto $memoryInfo
      */
     $memoryInfo = $this->getCommandExecutionResult($commandsDto);
     $cpuMemDto->setMemFree($memoryInfo->getMemFree());
     return $cpuMemDto;
 }
예제 #2
0
 protected static function getMemFree()
 {
     $cpuMemDto = new CpuMemDto();
     $cpuMemDto->setMemFree((int) `grep 'MemFree' /proc/meminfo | awk '{printf("%-8s",\$2)}'`);
     return $cpuMemDto;
 }