1
P4Frost
Server Load / Status
  • 2004/5/13 19:22

  • P4Frost

  • Just popping in

  • Posts: 10

  • Since: 2004/1/5 1


Is there a hack, module, script that will display my current site load? I've seen a few sites run by php-nuke or others that do this, can xoops?

Thanks
Virtual-Octane.net

2
brash
Re: Server Load / Status
  • 2004/5/13 22:11

  • brash

  • Friend of XOOPS

  • Posts: 2206

  • Since: 2003/4/10


Can you give a specific example (URL)? There are several ways in which you can monitor server load using features such as SNMP. What items are you wanting to monitor exactly?

3
P4Frost
Re: Server Load / Status
  • 2004/5/14 1:23

  • P4Frost

  • Just popping in

  • Posts: 10

  • Since: 2004/1/5 1


If you go to overclockersclub.com, you'll notice a site load that is shown by LEDs. It's small and inconspicuous, but I like it and would like to intergrate something like that into my site.

4
brash
Re: Server Load / Status
  • 2004/5/14 2:09

  • brash

  • Friend of XOOPS

  • Posts: 2206

  • Since: 2003/4/10


That'll most likely be a custom built script that displays that, and as far as I know there is nothing like that expressly built for Xoops. You could try having a look at HotScripts, but it'll depend on what operating system you use to an extent.

5
cptwinky
Re: Server Load / Status
  • 2004/5/14 3:34

  • cptwinky

  • Just popping in

  • Posts: 37

  • Since: 2004/5/1 2


I like this and want something similiar so I am having a go at creating it to put into a block. Getting the servers load average is pretty easy if you use a linux host but parsing that info and creating images to display it are new to me so maybe I will learn a thing or two.

6
DonXoop
Re: Server Load / Status

The easiest way I know is to use a stand alone app like Mrtg or anything you like. Then with Tinycontent or something you make a page to present the resulting graphs. And then only allow at most your logged in users to see it.

I'm not a big fan of realtime stats on the webpage. The cool factor wears off quickly and they tend to increase the server load (ironic eh?). Too much server info is a bad thing as it can give crackers more info than you want them to have.

7
cptwinky
Re: Server Load / Status
  • 2004/5/14 14:52

  • cptwinky

  • Just popping in

  • Posts: 37

  • Since: 2004/5/1 2


// $Id: uptime.php,v 0.1.1 2004/05/14 10:27am David Wagner $                                 //
//  ------------------------------------------------------------------------ //
//  This program is free software; you can redistribute it and/or modify     //
//  it under the terms of the GNU General Public License as published by     //
//  the Free Software Foundation; either version 2 of the License, or        //
//  (at your option) any later version.                                      //
//                                                                           //
//  You may not change or alter any portion of this comment or credits       //
//  of supporting developers from this source code or any supporting         //
//  source code which is considered copyrighted (c) material of the          //
//  original comment or credit authors.                                      //
//                                                                           //
//  This program is distributed in the hope that it will be useful,          //
//  but WITHOUT ANY WARRANTY; without even the implied warranty of           //
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            //
//  GNU General Public License for more details.                             //
//                                                                           //
//  You should have received a copy of the GNU General Public License        //
//  along with this program; if not, write to the Free Software              //
//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA //
//  ------------------------------------------------------------------------ //
//
// Config Section
// Configure these values to match what you want
//
// Table BGCOLOR
        
$bgcolor '#CCCCCC';
//
// Table Border
        
$border '0';
        
$border_color '#000000';
//
// Graph image to use. Prefferably keep this to 10*2 in dimmensions.
        //$image = "{X_SITEURL}images/bar.gif";
        
$image 'images/bar.gif';

$load exec('cat /proc/loadavg');
$load explode(' ',$load);
array_pop($load);
array_pop($load);

$scale '1.5';
$total = ($load[0]*100);  
$bar $total*$scale;

echo
'.$border.'" bordercolor="'.$border_color.'">
    
    .$bgcolor.'">.$image.'" width="'.$bar.'" height="10" border="0">
  
    '
;
?>


Well I have made that, which seems to work alright. I set it to use the 1 minute average but the 5 and 15 minute averages can be used by setting $load[0] to $load[1] and $load[2] respectively. The only problem I am having is when I put this into a custom php block it distorts the page badly. Any help with this from others would be great.

8
P4Frost
Re: Server Load / Status
  • 2004/5/14 15:17

  • P4Frost

  • Just popping in

  • Posts: 10

  • Since: 2004/1/5 1


Thanks for the work on this guys, it's not something I must have, but I thought it would be neat.

Another thing I'm trying to do is get my most recent IPB topics displayed in a block. I have my forum stats already, but I would like my users to see what the most popular topics on my board are. Problem is, I use IPB and I'm not a fan of the XOOPS portal hacks for IPB.

9
cptwinky
Re: Server Load / Status
  • 2004/5/15 3:00

  • cptwinky

  • Just popping in

  • Posts: 37

  • Since: 2004/5/1 2


I got it working, same code as above only on this site instead... http://www.nixpert.com/

I wonder what the difference is?

Login

Who's Online

330 user(s) are online (231 user(s) are browsing Support Forums)


Members: 0


Guests: 330


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits