Bravo List
Register
Go Back   > Bravo List > Source Code > Archived Trackers > Template Shares
Reply
Thread Tools
  #1  
Old 9th July 2008, 03:56
scener scener is offline
Member
 
Join Date: Jul 2008
Posts: 1
Default [REQ] Server load mod
I need a working Server load mod.

my server load mod from staff panel didn't work.


thanks
Reply With Quote
  #2  
Old 23rd July 2008, 04:54
nasul9 nasul9 is offline
Member
 
Join Date: Jun 2008
Romania
Posts: 1
Default Re: [REQ] Server load mod
Add in index.php on tbdev.net(netmaniack's edition)1.6
Code:
<h2>Server load</h2><table width=100% border=1 cellspacing=0 cellpadding=10><tr><td align="center"><table class="main" border="0" width="402" height="15"><tbody><tr><td style="padding: 0px; background-image: url(./pic/loadbarbg.gif); background-repeat: repeat-x;"><?$perc = get_server_load();$percent = min(100, $perc);if ($percent <= 70) $pic = "loadbargreen.gif";elseif ($percent <= 90) $pic = "loadbaryellow.gif";else $pic = "loadbarred.gif";$width = $percent * 4;print("<img height=15 width=$width src=./pic/$pic alt='$percent%'></td></tr>");  ?></tbody></table></td></td></tr></table></td></tr></table>
Add in global.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}}
Reply With Quote
Reply

Tags
load , mod , req , server


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
warning in server load toontigger Torrent Strike 3 4th February 2010 23:33
Announce.php high load in mysqld on 1500 peers cobrabm Free Torrent Source 8 3rd January 2010 00:37
announce.php cauzing high load on hosting servers Syn Template Shares 8 29th June 2009 22:26
XAM Server was down... Fynnon Template Shares 2 1st November 2008 17:42
Plaease help Server Load problem!!! dmtr123 Torrent Trader 2 19th October 2008 20:18



All times are GMT +2. The time now is 14:35. vBulletin skin by ForumMonkeys. Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.