ExecQuery("SELECT NumberOfLogicalProcessors FROM Win32_Processor"); foreach ($processors as $processor) { $ncpu = (int)$processor->NumberOfLogicalProcessors; } } } catch (Exception $e) { a2wl_error_log( "LocalService::getNumberOfProcessors - could not retrieve processor count: " . $e->getMessage() ); } } return $ncpu; } public function getSystemLoadAverage(): array { if (!function_exists('sys_getloadavg')) { return []; } $load = \sys_getloadavg(); if ($load === false) { return []; } foreach ($load as &$item) { $item = number_format((float)$item, 2, '.', ''); } return $load; } public function getMemoryUsageInBytes(): int { return memory_get_usage(true); } }