InstancesOf("Win32_Processor"); $cpuload = 0; $i = 0; while ($cpu = $cpus->Next()) { $cpuload += $cpu->LoadPercentage; $i++; } $cpuload = round($cpuload / $i, 2); return "$cpuload%"; } else { return false; } } } function server_busy($numer){ if (PHP_OS == 'Linux' && @file_exists('/proc/loadavg') && $filestuff = @file_get_contents('/proc/loadavg')){ $loadavg = explode(' ', $filestuff); if (trim($loadavg[0]) > $numer) { print 'sorry, server busy, ....'; exit(0); } } } $srv = server_busy(4); //End Check ServerLoad require_once(NVCMS_DIR."/www/index.php"); ?>