예제 #1
0
 public function __construct($settings)
 {
     // Initiate parent
     parent::__construct($settings);
     // We search these folders for our commands
     $this->exec->setSearchPaths(array('/sbin', '/bin', '/usr/bin', '/usr/local/bin', '/usr/sbin'));
 }
예제 #2
0
 public function __construct($settings)
 {
     // Initiate parent
     parent::__construct($settings);
     // We search these folders for our commands
     $this->exec->setSearchPaths(array('/sbin', '/bin', '/usr/bin', '/usr/pkg/bin', '/usr/sbin'));
     // sysctl values we'll access below
     $this->GetSysCTL(array('kern.boottime', 'vm.loadavg'), false);
 }
예제 #3
0
 public function __construct($settings)
 {
     // Instantiate parent
     parent::__construct($settings);
     // We search these folders for our commands
     $this->exec->setSearchPaths(array('/sbin', '/bin', '/usr/bin', '/usr/sbin'));
     // We need these sysctl values
     $this->GetSysCTL(array('machdep.cpu.vendor', 'machdep.cpu.brand_string', 'hw.cpufrequency', 'hw.ncpu', 'vm.swapusage', 'hw.memsize', 'hw.usermem', 'kern.boottime', 'vm.loadavg', 'hw.model'), false);
 }
예제 #4
0
 public function __construct($settings)
 {
     // Initiate parent
     parent::__construct($settings);
     // We search these folders for our commands
     $this->exec->setSearchPaths(array('/sbin', '/bin', '/usr/bin', '/usr/local/bin', '/usr/sbin'));
     // sysctl values we'll access below
     $this->GetSysCTL(array('kern.boottime', 'vm.vmtotal', 'vm.loadavg', 'hw.model', 'hw.ncpu', 'hw.clockrate'), false);
     // Save version
     if (preg_match('/^([\\d\\.]+)/', php_uname('r'), $vm) != 0) {
         $this->version = (double) $vm[1];
     }
 }
예제 #5
0
 public function __construct($settings)
 {
     // Instantiate parent
     parent::__construct($settings);
     // We search these folders for our commands
     $this->exec->setSearchPaths(array('/sbin', '/bin', '/usr/bin', '/usr/sbin'));
     // We need these sysctl values
     $this->GetSysCTL(array('machdep.cpu.vendor', 'machdep.cpu.brand_string', 'hw.cpufrequency', 'hw.ncpu', 'vm.swapusage', 'hw.memsize', 'hw.usermem', 'kern.boottime', 'vm.loadavg', 'hw.model'), false);
     // And get this info for when the above fails
     try {
         $this->systemProfiler = $this->exec->exec('system_profiler', 'SPHardwareDataType SPSoftwareDataType SPPowerDataType');
     } catch (CallExtException $e) {
         // Meh
         $this->error->add('Linfo Mac OS 10', 'Error using system_profiler');
     }
 }