UBB.Dev
For my forums I've set the online time to 10 minutes.
I think that by decreasing the online time, you have a much better overview of who is "REALLY" online at that moment. This can also be usefull when you want to get in contact with someone who is online at that moment.

Or is there a good reason for setting this to 90 minutes ?
the lower the number, the higher the server load
server load is the biggest reason. When you have larger sites with sometimes 100+ online at a time, and you have all of those people refreshing the who's online box with every page they load, it can really slow things down
I like to pop in and see who's been here - and I can't check in every 10 minutes.
josh is a stalker
[]Jeremy said:
server load is the biggest reason. When you have larger sites with sometimes 100+ online at a time, and you have all of those people refreshing the who's online box with every page they load, it can really slow things down [/]


really?
intresting, my site has quite a few people online most of the time, (70+ on my 15min window) so if I up this to say 30 mins, it'll reduce my load?
Will try this out!
Are there any figures of how increasing the time affects load?
[]monkeyra said:
Will try this out!
Are there any figures of how increasing the time affects load? [/]

Monk, I noticed you have changed the refresh time, did it make much difference?
havent checked my server load yet.
must get around to it....


load this script into a file named "serverload.php" and upload it to yor server then call it up in the browser. It will tell you.
Code
  <?php<br /><br />	$loadavg_array = explode(" ", exec("cat /proc/loadavg"));<br />	$loadavg = $loadavg_array[2];<br />	print("Server load: " . $loadavg . "%");<br />?>


This little code will tell you how long the server has been up since last reboot.. we can call this one server-uptime.php
Code
<p><font color="#999999">     <br /><?<br />function linuxUptime() {<br />  $ut = strtok( exec( "cat /proc/uptime" ), "." );<br />  $days = sprintf( "%2d", ($ut/(3600*24)) );<br />  $hours = sprintf( "%2d", ( ($ut % (3600*24)) / 3600) );<br />  $min = sprintf( "%2d", ($ut % (3600*24) % 3600)/60  );<br />  $sec = sprintf( "%2d", ($ut % (3600*24) % 3600)%60  );<br />  return array( $days, $hours, $min, $sec );<br />}<br />$ut = linuxUptime();<br />// If you would like to show the seconds as well just add [ , $ut[3] seconds ] after minutes.<br /><br />echo "Time since last reboot: $ut[0] days, $ut[1] hours, $ut[2] minutes, $ut[3] seconds"<br />?><br /></font></p>  


ahhh, cool little script!
thanks!
Ya, Both of thoose should be added to that "Stats Page" we talked about on the other thread. You could see the server oad and uptime with all the stats from the forum.
dang, thats a good idea
Monkeyra,

Not sure about a 'stats page' but if you want to include this on your control panel index page....

In templates/default/admin/login.tmpl


###
###find
###


$pa_link
$db_link
$modq_link

###
###Change to
###


$pa_link
$db_link
$modq_link

<br /> <br />


UBBTPRINT;



$loadavg_array = explode(" ", exec("cat /proc/loadavg")); $loadavg = $loadavg_array[2]; print("Server load: " . $loadavg . "%");


echo <<<UBBTPRINT


<br />
<br />

UBBTPRINT;

function linuxUptime() { $ut = strtok( exec( "cat /proc/uptime" ), "." );
$days = sprintf( "%2d", ($ut/(3600*24)) );
$hours = sprintf( "%2d", ( ($ut % (3600*24)) / 3600) );
$min = sprintf( "%2d", ($ut % (3600*24) % 3600)/60 );
$sec = sprintf( "%2d", ($ut % (3600*24) % 3600)%60 );
return array( $days, $hours, $min, $sec );
}$ut = linuxUptime();
print ("Time since last reboot: $ut[0] days, $ut[1] hours, $ut[2] minutes, $ut[3] seconds");

echo <<<UBBTPRINT

<br /> <br />


------------------

This is very similar to Dr. C's code except I am using the print command rather than the .echo
Thanks guys.
this is such a handy little tool!
Thanks Ian_W!

Now what is a "healthy" server load ?
This is something i've been researching. AFAIK (and it's only from what i've read) it's a bit of a subjective measure, factors such as server specs can mean what might be considered a high load on a lesser machine, it's acceptable on a higher-spec machine.
What i'd like to know though, is what is it a measure of? Is it measured from 0-100%?
or 0-10?
whats the parameters?
© UBB.Developers