Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Jan 2003
Posts: 263
Member
Member
Joined: Jan 2003
Posts: 263
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 ?

Sponsored Links
Joined: Aug 2000
Posts: 3,590
Moderator
Moderator
Offline
Joined: Aug 2000
Posts: 3,590
the lower the number, the higher the server load

Joined: Feb 2002
Posts: 1,759
Addict
Addict
Offline
Joined: Feb 2002
Posts: 1,759
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

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
I like to pop in and see who's been here - and I can't check in every 10 minutes.

Joined: Feb 2002
Posts: 1,759
Addict
Addict
Offline
Joined: Feb 2002
Posts: 1,759
josh is a stalker

Sponsored Links
Joined: Jun 2001
Posts: 356
Junior Member
Junior Member
Offline
Joined: Jun 2001
Posts: 356
[]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?

Joined: Aug 2004
Posts: 173
Member
Member
Offline
Joined: Aug 2004
Posts: 173
[]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?

Joined: Jun 2001
Posts: 356
Junior Member
Junior Member
Offline
Joined: Jun 2001
Posts: 356
havent checked my server load yet.
must get around to it....

Joined: Sep 2003
Posts: 803
Coder
Coder
Offline
Joined: Sep 2003
Posts: 803


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>  



Joined: Jun 2001
Posts: 356
Junior Member
Junior Member
Offline
Joined: Jun 2001
Posts: 356
ahhh, cool little script!
thanks!

Sponsored Links
Joined: Sep 2003
Posts: 803
Coder
Coder
Offline
Joined: Sep 2003
Posts: 803
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.

Joined: Jun 2001
Posts: 356
Junior Member
Junior Member
Offline
Joined: Jun 2001
Posts: 356
dang, thats a good idea

Joined: Feb 2002
Posts: 2,286
Veteran
Veteran
Joined: Feb 2002
Posts: 2,286
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


Fans Focus - Focusing on Fans of Sport

(Okay - mainly football (the British variety wink at the moment - but expanding all the time....)
Joined: Jun 2001
Posts: 356
Junior Member
Junior Member
Offline
Joined: Jun 2001
Posts: 356
Thanks guys.
this is such a handy little tool!

Joined: Jan 2003
Posts: 263
Member
Member
Joined: Jan 2003
Posts: 263
Thanks Ian_W!

Now what is a "healthy" server load ?

Joined: Jun 2001
Posts: 356
Junior Member
Junior Member
Offline
Joined: Jun 2001
Posts: 356
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?


Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
isaac
isaac
California
Posts: 1,157
Joined: July 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)