replace in index.php
Code:
<? //WILBA'S SERVERLOAD//
begin_frame("Server load",true,5);?>
<?
function getmicrotime(){
list($usec, $sec) = explode(" ",microtime());
return ((float)$usec + (float)$sec);
}
$time_start = getmicrotime();
$time = round(getmicrotime() - $time_start,4);
$percent = $time * 60;
$time = round(getmicrotime() - $time_start,4);
$percent = $time * 60;
echo "<div align=\"center\">Our Tracker Load: ($percent %)</div><table class=blocklist align=center border=0 width=400><tr><td style='padding: 0px; background-image: url(pic/loadbarbg.gif); background-repeat: repeat-x'>";
//TRACKER LOAD
if ($percent <= 70) $pic_base_url = "pic/loadbargreen.gif";
elseif ($percent <= 90) $pic_base_url = "pic/loadbaryellow.gif";
else $pic_base_url = "pic/loadbarred.gif";
$width = $percent * 4;
echo "<img height=15 width=$width src=\"$pic_base_url\" alt='$percent%'></td></tr></table>
";
echo "<center>" . trim(exec('uptime')) . "</center>
";
if (isset($load))
print("<tr><td class=blocklist>10min load average (%)</td><td align=right>$load</td></tr>\n");
print (date("l d<\sup>S</\sup> F Y h:i A"));
$time = round(getmicrotime() - $time_start,4);
$percent = $time * 60;
echo "<div align=\"center\">Global Server Load (All websites on current host servers): ($percent %)</div><table class=blocklist align=center border=0 width=400><tr><td style='padding: 0px; background-image: url(pic/loadbarbg.gif); background-repeat: repeat-x'>";
if ($percent <= 70) $pic_base_url = "pic/loadbargreen.gif";
elseif ($percent <= 90) $pic_base_url = "pic/loadbaryellow.gif";
else $pic_base_url = "pic/loadbarred.gif";
$width = $percent * 4;
echo "<img height=15 width=$width src=\"$pic_base_url\" alt='$percent%'></td></tr></table>";
?>
<?end_frame();?>
with
Code:
<?begin_frame("Server load",true,5);?>
<table class="main" border="0" width="402"><tr><td style='padding: 0px; background-image: url(pic/loadbarbg.gif); background-repeat: repeat-x'>
<? $percent = min(100, round(exec('ps ax | grep -c apache') / 256 * 100));
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></table>
<?end_frame();?>