php forum
php mysql forum
php mysql smarty
 
Topic Options
#279325 - 09/04/04 05:59 PM Could the "who's online" time be decreased ? :)
Pasqualist Offline
Member

Registered: 01/30/03
Posts: 285
Loc: Amsterdam, The Netherlands
For my forums I've set the online time to 10 minutes. <br />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. <br /> <br />Or is there a good reason for setting this to 90 minutes ? <img src="http://www.ubbdev.com/forum/images/graemlins/laugh.gif" alt="" />

Top
#279326 - 09/04/04 06:10 PM Re: Could the "who's online" time be decreased ? :) [Re: 10k]
The Team Offline
Moderator

Registered: 08/11/00
Posts: 182
Loc: yes
the lower the number, the higher the server load

Top
#279327 - 09/04/04 07:32 PM Re: Could the "who's online" time be decreased ? :) [Re: javiersbabygirl]
msula Offline
Addict

Registered: 02/18/02
Posts: 1969
Loc: Lansing, Michigan
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 <img src="http://www.ubbdev.com/forum/images/graemlins/frown.gif" alt="" />

Top
#279328 - 09/04/04 09:17 PM Re: Could the "who's online" time be decreased ? :) [Re: palmen]
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
I like to pop in and see who's been here - and I can't check in every 10 minutes. <img src="http://www.ubbdev.com/forum/images/graemlins/wink.gif" alt="" />
_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top
#279329 - 09/04/04 09:34 PM Re: Could the "who's online" time be decreased ? :) [Re: Daine]
msula Offline
Addict

Registered: 02/18/02
Posts: 1969
Loc: Lansing, Michigan
josh is a stalker <img src="http://www.ubbdev.com/forum/images/graemlins/blush.gif" alt="" />

Top
#279330 - 09/16/04 11:27 AM Re: Could the "who's online" time be decreased ? :) [Re: palmen]
monkeyra Offline
Junior Member

Registered: 06/28/01
Posts: 363
Loc: uk
[]Jeremy said:<br />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 <img src="http://www.ubbdev.com/forum/images/graemlins/frown.gif" alt="" /> [/]<br /><br /><br />really?<br />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?<br />Will try this out!<br />Are there any figures of how increasing the time affects load?

Top
#279331 - 09/21/04 03:41 AM Re: Could the "who's online" time be decreased ? :) [Re: Luka_dup1]
dparvin Offline
Member

Registered: 08/08/04
Posts: 184
Loc: UK
[]monkeyra said:<br />Will try this out!<br />Are there any figures of how increasing the time affects load? [/]<br /><br />Monk, I noticed you have changed the refresh time, did it make much difference?
_________________________
parentforum.org

Top
#279332 - 09/22/04 05:30 PM Re: Could the "who's online" time be decreased ? :) [Re: DMClark]
monkeyra Offline
Junior Member

Registered: 06/28/01
Posts: 363
Loc: uk
havent checked my server load yet.<br />must get around to it....

Top
#279333 - 09/23/04 04:23 PM Re: Could the "who's online" time be decreased ? :) [Re: Luka_dup1]
DrChaos Offline
Coder

Registered: 09/12/03
Posts: 816
Loc: Hollywood Florida.
<img src="http://www.ubbdev.com/forum/images/graemlins/smile.gif" alt="" /><br /><br />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.<br />
Code:
  &lt;?php<br /><br />	$loadavg_array = explode(" ", exec("cat /proc/loadavg"));<br />	$loadavg = $loadavg_array[2];<br />	print("Server load: " . $loadavg . "%");<br />?&gt;
<br /><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 <br />
Code:
&lt;p&gt;&lt;font color="#999999"&gt;     <br />&lt;?<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 />?&gt;<br />&lt;/font&gt;&lt;/p&gt;  
<br /><br /> <img src="http://www.ubbdev.com/forum/images/graemlins/smirk.gif" alt="" />
_________________________
DrChaos
LeetGamers

Top
#279334 - 09/29/04 09:42 AM Re: Could the "who's online" time be decreased ? :) [Re: Duck]
monkeyra Offline
Junior Member

Registered: 06/28/01
Posts: 363
Loc: uk
ahhh, cool little script!<br />thanks!

Top
#279335 - 09/30/04 12:43 PM Re: Could the "who's online" time be decreased ? :) [Re: Luka_dup1]
DrChaos Offline
Coder

Registered: 09/12/03
Posts: 816
Loc: Hollywood Florida.
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.
_________________________
DrChaos
LeetGamers

Top
#279336 - 09/30/04 02:08 PM Re: Could the "who's online" time be decreased ? :) [Re: Duck]
monkeyra Offline
Junior Member

Registered: 06/28/01
Posts: 363
Loc: uk
dang, thats a good idea <img src="http://www.ubbdev.com/forum/images/graemlins/wink.gif" alt="" />

Top
#279337 - 09/30/04 05:53 PM Re: Could the "who's online" time be decreased ? :) [Re: Luka_dup1]
Ian_W Offline

Veteran

Registered: 02/22/02
Posts: 2575
Loc: England
Monkeyra,<br /><br />Not sure about a 'stats page' but if you want to include this on your control panel index page....<br /><br />In templates/default/admin/login.tmpl<br /><br /><br />###<br />###find<br />###<br /><br /><br />$pa_link<br />$db_link<br />$modq_link<br /><br />###<br />###Change to<br />###<br /><br /><br />$pa_link<br />$db_link<br />$modq_link<br /><br /><br /> <br /><br /><br /><br />UBBTPRINT;<br /><br /><br /><br /> $loadavg_array = explode(" ", exec("cat /proc/loadavg")); $loadavg = $loadavg_array[2]; print("Server load: " . $loadavg . "%"); <br /><br /><br />echo <<<UBBTPRINT<br /><br /><br /><br /><br /><br /><br /><br />UBBTPRINT;<br /><br /> function linuxUptime() { $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 /> }$ut = linuxUptime();<br /> print ("Time since last reboot: $ut[0] days, $ut[1] hours, $ut[2] minutes, $ut[3] seconds");<br /> <br />echo <<<UBBTPRINT<br /><br /><br /> <br /><br /><br /><br />------------------<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....)

Top
#279338 - 10/01/04 02:00 AM Re: Could the "who's online" time be decreased ? :) [Re: Gorlum]
monkeyra Offline
Junior Member

Registered: 06/28/01
Posts: 363
Loc: uk
Thanks guys.<br />this is such a handy little tool!

Top
#279339 - 10/03/04 06:41 AM Re: Could the "who's online" time be decreased ? :) [Re: Luka_dup1]
Pasqualist Offline
Member

Registered: 01/30/03
Posts: 285
Loc: Amsterdam, The Netherlands
Thanks Ian_W!<br /><br />Now what is a "healthy" server load ?

Top
#279340 - 10/03/04 08:27 AM Re: Could the "who's online" time be decreased ? :) [Re: 10k]
monkeyra Offline
Junior Member

Registered: 06/28/01
Posts: 363
Loc: uk
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.<br />What i'd like to know though, is what is it a measure of? Is it measured from 0-100%?<br />or 0-10?<br />whats the parameters?

Top



Moderator:  Deb 
Latest Posts
[7.2.1] - Naked shoutbox
by bellaonline
05/05/12 05:00 PM
[7.x] Stop Forum Spam Integration v0.4
by bellaonline
05/05/12 03:53 PM
Shout Box

(Views)Popular Topics
Known public proxy servers 1689885
Integrated Index Page (IIP) 5.3.1 555705
Finished-[6.5.2] Games Arcade Deluxe v1.9 501236
Integrated Index Page (IIP) 5.1.1 415112
TLD Bv2.1 Released - Threads Links Directory 396822
[6.0x] Who's Online 4.0.0 [Finished] 389412
Finished-[6.5.1] Integrated Index Page (IIP) 6.5 330423
Q & A 298663
Slash UBB 266936
[6.3.x] [beta] Hit Hack 2.0 227970
Forum Stats
13621 Members
59 Forums
37191 Topics
295716 Posts

Max Online: 686 @ 06/28/07 07:04 AM

 

 

 
fusionbb message board php hacks