[REQ] Server load mod
I need a working Server load mod.
my server load mod from staff panel didn't work. thanks |
Re: [REQ] Server load mod
Add in index.php on tbdev.net(netmaniack's edition)1.6
Code:
|
function get_server_load($windows = 0) {if(class_exists("COM")) { $wmi = new COM("WinMgmts:\\\\."); $cpus = $wmi->InstancesOf("Win32_Processor"); $i = 1; // Use the while loop on PHP 4 and foreach on PHP 5 //while ($cpu = $cpus->Next()) { foreach($cpus as $cpu) { $cpu_stats += $cpu->LoadPercentage; $i++; } return round($cpu_stats/2); // remove /2 for single processor systems}}
All times are GMT +2. The time now is 14:35. |
Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.