Previous Thread
Next Thread
Print Thread
Rate Thread
Could the "who's online" time be decreased ? :)
#279325 09/04/2004 5:59 PM
Joined: Jan 2003
Posts: 263
Member
OP Offline
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
Re: Could the "who's online" time be decreased ? :)
10k #279326 09/04/2004 6:10 PM
Joined: Aug 2000
Posts: 3,590
Moderator
Offline
Moderator
Joined: Aug 2000
Posts: 3,590
the lower the number, the higher the server load

Re: Could the "who's online" time be decreased ? :)
javiersbabygirl #279327 09/04/2004 7:32 PM
Joined: Feb 2002
Posts: 1,759
Addict
Offline
Addict
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

Re: Could the "who's online" time be decreased ? :)
palmen #279328 09/04/2004 9:17 PM
Joined: Nov 2001
Posts: 10,369
I type Like navaho
Offline
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.

Re: Could the "who's online" time be decreased ? :)
Daine #279329 09/04/2004 9:34 PM
Joined: Feb 2002
Posts: 1,759
Addict
Offline
Addict
Joined: Feb 2002
Posts: 1,759
josh is a stalker

Sponsored Links
Re: Could the "who's online" time be decreased ? :)
palmen #279330 09/16/2004 11:27 AM
Joined: Jun 2001
Posts: 356
Junior Member
Offline
Junior Member
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?

Re: Could the "who's online" time be decreased ? :)
Luka_dup1 #279331 09/21/2004 3:41 AM
Joined: Aug 2004
Posts: 173
Member
Offline
Member
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?

Re: Could the "who's online" time be decreased ? :)
DMClark #279332 09/22/2004 5:30 PM
Joined: Jun 2001
Posts: 356
Junior Member
Offline
Junior Member
Joined: Jun 2001
Posts: 356
havent checked my server load yet.
must get around to it....

Re: Could the "who's online" time be decreased ? :)
Luka_dup1 #279333 09/23/2004 4:23 PM
Joined: Sep 2003
Posts: 803
Coder
Offline
Coder
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>  



Re: Could the "who's online" time be decreased ? :)
Duck #279334 09/29/2004 9:42 AM
Joined: Jun 2001
Posts: 356
Junior Member
Offline
Junior Member
Joined: Jun 2001
Posts: 356
ahhh, cool little script!
thanks!

Sponsored Links
Re: Could the "who's online" time be decreased ? :)
Luka_dup1 #279335 09/30/2004 12:43 PM
Joined: Sep 2003
Posts: 803
Coder
Offline
Coder
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.

Re: Could the "who's online" time be decreased ? :)
Duck #279336 09/30/2004 2:08 PM
Joined: Jun 2001
Posts: 356
Junior Member
Offline
Junior Member
Joined: Jun 2001
Posts: 356
dang, thats a good idea

Re: Could the "who's online" time be decreased ? :)
Luka_dup1 #279337 09/30/2004 5:53 PM
Joined: Feb 2002
Posts: 2,286
Veteran
Offline
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....)
Re: Could the "who's online" time be decreased ? :)
Gorlum #279338 10/01/2004 2:00 AM
Joined: Jun 2001
Posts: 356
Junior Member
Offline
Junior Member
Joined: Jun 2001
Posts: 356
Thanks guys.
this is such a handy little tool!

Re: Could the "who's online" time be decreased ? :)
Luka_dup1 #279339 10/03/2004 6:41 AM
Joined: Jan 2003
Posts: 263
Member
OP Offline
Member
Joined: Jan 2003
Posts: 263
Thanks Ian_W!

Now what is a "healthy" server load ?

Re: Could the "who's online" time be decreased ? :)
10k #279340 10/03/2004 8:27 AM
Joined: Jun 2001
Posts: 356
Junior Member
Offline
Junior Member
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
Posts: 70
Joined: January 2007
Forum Statistics
Forums63
Topics37,533
Posts293,731
Members13,834
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online 255
Topics Created 0
Posts Made 1
Users Online 3
Birthdays 22
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,796
Greg Hard 4,625
Top Posters(30 Days)
isaac 7
driv 3
Gizmo 1
Top Likes Received
isaac 34
Gizmo 8
Brett 7
Morgan 2
Top Likes Received (30 Days)
isaac 1
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2020 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 7.7.5
(Snapshot build 20200315.dev)
Responsive Width:

PHP: 5.4.45 Page Time: 0.062s Queries: 47 (0.025s) Memory: 3.3757 MB (Peak: 3.6255 MB) Data Comp: Zlib Server Time: 2020-03-28 17:29:13 UTC
Valid HTML 5 and Valid CSS