PDA

View Full Version : Microstats - load times, server loads, queries, uncached templates


Pages : [1] 2

ShiningArcanine
06-10-2005, 10:00 PM
This is a derivative of Erwin's microstats hack for vBulletin 3.5.0's plugin system. The main difference is that by default it shows the page generation time and query count to the public. Server loads and Uncached Queries are shown only to administrators.

I had sent this to Erwin so he could release if he wanted to but instead he told me that I had permission to release it; hence why I am releasing it.

This should work with vBulletin 3.5.0 RC 1 through vBulletin 3.6.1 and later.

Installation is very simple. Just import the plugin via vBulletin's "Download / Upload Plugins" page in the Plugin System in the Admin Control Panel and you're done.

I'll try to correct any bugs that you find. Let me know if you like this plugin and don't forget to click the install link if you install this.

Optional config.php Variables

$config['Microstats']['replacementvariable']

Setting this variable will make microstats place its data before any instance of whatever you set this variable to. Be careful with this as you might see microstats in mutiple places. My suggestion is to use a unique comment in the HTML source to prevent any issues.

E.g. $config['Microstats']['replacementvariable'] = '<!-- display microstats here -->';

$config['Microstats']['adminonly']

Setting this variable to anything will make microstats display itself only to administrators.

E.g. $config['Microstats']['adminonly'] = true;

Update History

Product File: Uploaded a product file that replaced the plugin file.
Version 1.2.1: Fixed a bug that broke optional config.php settings
Version 1.2.0: Added OpenBSD, FreeBSD and NetBSD support; added Replacement variable setting in config.php; added Display only to Administrators Setting in config.php; fixed bug affecting Linux/Unix servers that have exec('uptime') support and not /proc/loadavg support
Version 1.1.0: Added names of uncached templates, included a bugfix for people who don't have proc avaliable on their system and made the code look a little nicer as well
Version 1.0.1: Bugfix for Windows users, sanitized the code to make it look nicer
Version 1.0.0: Initial Release

WiBu
06-11-2005, 11:43 AM
I don't like the way the public see the stats, even if it is only queries and page load. Oh well, edited it to my liking.

Logikos
06-11-2005, 01:28 PM
Good work ShiningArcanine!

FleaBag
06-11-2005, 01:41 PM
Nice work!

RMS-Chef
06-11-2005, 01:48 PM
Even as admin I am only seeing:
Page generated in 0.06230 seconds with 9 queries

All other versions of MS have worked out of the box on my server. Any ideas?

Svenna
06-11-2005, 02:00 PM
nice job ShiningArcanine

mOdEtWo
06-11-2005, 03:16 PM
I was waiting for this one. :)

ShiningArcanine
06-11-2005, 03:26 PM
Even as admin I am only seeing:
Page generated in 0.06230 seconds with 9 queries

All other versions of MS have worked out of the box on my server. Any ideas?

Is that your primary usergroup? Does the administrator usergroup have 6 as its id on your forums? This is probably a stupid question but what version of vBulletin are you running?

Jenta
06-11-2005, 05:51 PM
gj, this is one hack i have installed on 3.0.7
now i need about 5 more converted so i can upgrade :)

im really starting to like this plugin idea

RMS-Chef
06-11-2005, 06:46 PM
Is that your primary usergroup? Does the administrator usergroup have 6 as its id on your forums? This is probably a stupid question but what version of vBulletin are you running?
It's just a fresh install of v3.5 beta 1. Nothing other than this plugin has been done except for some styles I have ported over. I get the same result on the untouched default style as well as the 3 I have moved over to 3.5.
I as the admin am the only member and yes, Admin is default group 6.

EDIT:
I even took out
if ($vbulletin->userinfo['usergroupid']==6)
and still get the same result. Wierd. It must have something to do with my server config? I have the vB3x version running fine on 2 other boards www.StaticServer.com (http://www.StaticServer.com) (only admins can view) and my main board at www.Chefhost.com (http://www.Chefhost.com) where you should see limited stats as unregistered.

eXtremeTim
06-11-2005, 10:11 PM
Are you on windows? Windows wont show server loads. Also can we get debug info and gzip level in here for admins?

ShiningArcanine
06-12-2005, 02:04 AM
Are you on windows? Windows wont show server loads. Also can we get debug info and gzip level in here for admins?

Debug Information? What debug information are you proposing?

As for gzip, I'm not sure if it can be accurately detected as it can be enabled via .htaccess.

RMS-Chef
06-12-2005, 04:04 AM
Are you on windows? Windows wont show server loads.
No, it's a Linux machine.
Like I said, I have the vB3.x.x version running fine on my public board.

eXtremeTim
06-12-2005, 04:23 AM
You need to redo this part right here.


if ($vbulletin->userinfo['usergroupid']==6) {
$loadavg = @file_get_contents("/proc/loadavg");
if ($loadavg) {
$regs = explode(" ",$loadavg);
$serverload=' [Server Loads: <b>'.$regs[0].'</b> '.$regs[1].' : '.$regs[2].']';
$debughtml .= iif($_TEMPLATEQUERIES, " (<b>" . sizeof($_TEMPLATEQUERIES) . "</b> queries for uncached templates)", '') . "$serverload";
}
}


Like me im on windows so I dont have proc meaning that I dont get to see any of the admin stats becuase of the way you have it laid out.

mholtum
06-12-2005, 04:34 AM
Works like a charm! Thanks

neocorteqz
06-12-2005, 11:16 AM
Debug Information? What debug information are you proposing?

As for gzip, I'm not sure if it can be accurately detected as it can be enabled via .htaccess.
he's talking like Teck's hack.

Dan
06-12-2005, 11:18 AM
Yea it's a nice plugin but it just makes me feel like it's lacking a bit of info.

/me clicks install

ShiningArcanine
06-12-2005, 01:04 PM
You need to redo this part right here.


if ($vbulletin->userinfo['usergroupid']==6) {
$loadavg = @file_get_contents("/proc/loadavg");
if ($loadavg) {
$regs = explode(" ",$loadavg);
$serverload=' [Server Loads: <b>'.$regs[0].'</b> '.$regs[1].' : '.$regs[2].']';
$debughtml .= iif($_TEMPLATEQUERIES, " (<b>" . sizeof($_TEMPLATEQUERIES) . "</b> queries for uncached templates)", '') . "$serverload";
}
}


Like me im on windows so I dont have proc meaning that I dont get to see any of the admin stats becuase of the way you have it laid out.

I've released version 1.0.1 so Windows users will get to see the queries for uncached templates.

he's talking like Teck's hack.

That would require file edits and I like having this as a plugin.

neocorteqz
06-12-2005, 01:48 PM
That would require file edits and I like having this as a plugin.

It works great, and it's a quick 2 second upload. :)

For the lot of us that want something more advanced, i'm sure it'll be around, but this works fine for the ones not looking for the extra functionality.

Again, Nice work, thanks for the release. :)

Dan
06-12-2005, 11:03 PM
Is it possible to move where the stats show up?

ShiningArcanine
06-13-2005, 11:54 PM
Is it possible to move where the stats show up?
Yes, just modify the plugin to place its code next to something other than </body>. I might make it possible to write this into config.php in a future version so it isn't necessary to have custom versions of the plugin.

jancarlo
06-14-2005, 12:35 PM
Warning: xml_get_error_code(): 31 is not a valid XML Parser resource in /includes/class_xml.php on line 235

Warning: xml_get_current_line_number(): 31 is not a valid XML Parser resource in /includes/class_xml.php on line 225

:surprised: :surprised: :surprised:

ShiningArcanine
06-16-2005, 09:45 PM
Warning: xml_get_error_code(): 31 is not a valid XML Parser resource in /includes/class_xml.php on line 235

Warning: xml_get_current_line_number(): 31 is not a valid XML Parser resource in /includes/class_xml.php on line 225

:surprised: :surprised: :surprised:
What version of vBulletin are you running, can you tell me how to reproduce that and are you sure that it was caused by the microstats plugin?

Tomek
06-16-2005, 10:31 PM
It doesn't display the load average, when you have activated and not correct the PHP settings open_basedir and/or safe_mode. Please take a look at the PHP manuals.

The old microstats hack for vBulletin 3.0 has used the command uptime to read the load average, but the new microstats plugin for vBulletin 3.5 uses cat /proc/loadavg like vBulletin itself does.

dreck
06-18-2005, 07:07 AM
Warning: xml_get_error_code(): 31 is not a valid XML Parser resource in /includes/class_xml.php on line 235

Warning: xml_get_current_line_number(): 31 is not a valid XML Parser resource in /includes/class_xml.php on line 225

:surprised: :surprised: :surprised:I got the same error when I copy & paste.
Try just saving the file from IE.

Nice plugin!

ShiningArcanine
06-18-2005, 12:25 PM
I don't like the way the public see the stats, even if it is only queries and page load. Oh well, edited it to my liking.
I've released version 1.1.0. This should display uncached template names, load averages on Linux systems when /proc is not available and makes the code look a little nicer.

Tomek
06-18-2005, 12:41 PM
Nice. :)

But I would do a little cosmetic change.

Find:
$serverload = ' [Server Loads: <b>' . $regs[0] .'</b> ' . $regs[1] . ' : ' . $regs[2] . ']';
Replace with:
$serverload = ' [Server Loads: <b>' . $regs[0] .'</b> : ' . $regs[1] . ' : ' . $regs[2] . ']';
You have to change this two times.

sHORTYWZ
06-18-2005, 01:04 PM
Getting this now on one of my boards..

Page generated in 0.14820 seconds with 9 queries [Server Loads: average: 0.04, 0.20, 0.25 0.04 : 0.20]

However, the other board is showing it just fine.

Snake
06-19-2005, 01:18 PM
Screenshot! Screenshot! Where is it?! :D lol

dreck
06-20-2005, 05:16 AM
screen shot! :banana:

Snake
06-20-2005, 10:11 AM
Oh great. Thanks for that. :D

Chris M
06-20-2005, 10:49 AM
Jesus that is a high server load :eek:

Take a look at mine :)

Satan

Snake
06-20-2005, 05:15 PM
That is nice!!!

ShiningArcanine
06-20-2005, 08:30 PM
Getting this now on one of my boards..

Page generated in 0.14820 seconds with 9 queries [Server Loads: average: 0.04, 0.20, 0.25 0.04 : 0.20]

However, the other board is showing it just fine.
It probably has something to do with your server. I'm not sure what I can do about it. Tell me, did the earlier versions work for you or were you one of the people affected by the no server loads issue?

sHORTYWZ
06-21-2005, 12:45 AM
Earlier version worked for me.

Get this though, I have two forums - both on the same box. One of them displays the double, one of them is perfectly fine. Both running same everything.

ShiningArcanine
06-22-2005, 02:43 AM
Earlier version worked for me.

Get this though, I have two forums - both on the same box. One of them displays the double, one of them is perfectly fine. Both running same everything.

That is peculiar. I'll think it over a bit more and examine the code in the morning but I'm not sure what is causing the problem.

By the way, are there any configuration differences between the two forums PHP wise or is everything the same?

sHORTYWZ
06-22-2005, 12:08 PM
100% the same.

ShiningArcanine
06-22-2005, 11:27 PM
Have you tried deleting the plugin and then reuploading it via the xml file?

Edit: Also, could you give me some specifics on your server's configuration? To be specific, I'd like to know your Operating System, PHP Version and MySQL Version.

sHORTYWZ
06-22-2005, 11:30 PM
Yup.

ShiningArcanine
06-22-2005, 11:34 PM
Yup.
Wow, that was a quick response. You responded before I edited my post. ^_^;;

Would you be able to give me me those specifics? They might be helpful in figuring out why you're seeing what you're seeing.

Christine
06-23-2005, 12:58 AM
Thanks for the port SA -- flawless install and working like a champ.

:)

sHORTYWZ
06-23-2005, 03:24 AM
Wow, that was a quick response. You responded before I edited my post. ^_^;;

Would you be able to give me me those specifics? They might be helpful in figuring out why you're seeing what you're seeing.
PHP 4.3.11
MYSQL 4.1.8
Linux

I'm just quite perplexed as to why these two forums, hosted on the same box display differently.. for some reason both parts of the if statement are being executed on the second forum.

DBs
06-23-2005, 08:34 AM
I too get the same, both parts of the load statement get executed and displayed.

TrentTech
06-23-2005, 10:10 AM
/me installs

Thanks SA!

Megatekno
06-23-2005, 03:56 PM
Thank ShiningArcanine

MentaL
06-28-2005, 01:20 PM
gr8!!

EvilHawk
06-29-2005, 11:51 AM
Nice plugin!

To display the load average at a freeBSD server I had to replace this
if ($loadavg = @file_get_contents("/proc/loadavg")) {

$regs = explode(" ",$loadavg);

With this
$loadavg = `sysctl vm.loadavg|cut -d" " -f3-5`;
if ($loadavg)
{
$regs = explode(" ",$loadavg);

this should also work at netbsd & openbsd servers! ;)

akanevsky
07-11-2005, 11:13 AM
Screenshots please?

akanevsky
07-11-2005, 11:23 AM
EvilHawk
I think you could also make a conditional that would execute one code if it is *BSD, and another code if it is *nix, couldn't you? It's displayed by the phpinfo() function, however I'm not sure how to retrieve it by a custom script. Could probably use a system command?

Dream
07-11-2005, 07:06 PM
this is great, the only thing that annoys me is it show up in places like the "attach manager" window and messes with the layout.

faast
07-18-2005, 09:03 PM
stupid qustion >> what is a query?

Snake
08-01-2005, 06:36 PM
Will this work on RC1?

BamaStangGuy
08-01-2005, 06:58 PM
What about people that have not whitespace below the footer?

Like my site:

http://www.mustangevolution.com/forum

Notice if I install this hack it pushes up the red bar at the bottom and looks weird... anyway to relocate the output text?

ShiningArcanine
08-01-2005, 07:28 PM
I was thinking of making a new version that allows this to be set from config.php.

Will this work on RC1?

I'm using it on RC1. There really aren't any changes Jelsoft should make to vBulletin in the foreseeable future that would break this modification.

What about people that have not whitespace below the footer?

Like my site:

http://www.mustangevolution.com/forum

Notice if I install this hack it pushes up the red bar at the bottom and looks weird... anyway to relocate the output text?

You'll want to modify it so that the line that looks for "</body>" and replaces it with "*microstats stuff*</body>" looks for something else.

Snake
08-01-2005, 07:46 PM
Oh boy this is a great hack but could you make a feature where administrators are "only" allowed to view the mircrostats? There is no point to show it up to the other members really. :\

akanevsky
08-01-2005, 08:01 PM
Screenshot, please? Seriously... :(

BamaStangGuy
08-01-2005, 09:44 PM
Screenshot, please? Seriously... :(

Someone already posted one!

akanevsky
08-01-2005, 09:47 PM
Where?

ShiningArcanine
08-02-2005, 01:16 AM
Oh boy this is a great hack but could you make a feature where administrators are "only" allowed to view the mircrostats? There is no point to show it up to the other members really. :\

Right now, administrators are the only ones allowed to view server loads.

Personally I like seeing execution times and query counts displayed on vBulletin so you'll have to modify it if you want it to display that information only to administrators.

Christine
08-02-2005, 01:23 AM
Where?

https://vborg.vbsupport.ru/showpost.php?p=669553&postcount=32

https://vborg.vbsupport.ru/showpost.php?p=669474&postcount=30

ShiningArcanine
08-02-2005, 01:47 AM
Okay, everyone. I took some time and wrote version 1.2.0. Here is the changelog:

-Added OpenBSD, FreeBSD and NetBSD support
-Added Replacement variable setting in config.php
-Added Display only to Administrators Setting in config.php
-Fixed bug affecting Linux/Unix servers that have exec('uptime') support and not /proc/loadavg support.

The replacement variable setting basically allows you to have the stock modification place its data before something other than "</body>." Everything else should be shelf explanatory.

Edit: So much for having to edit microstats so it is displayed only to administrators. :laugh: :ninja:

InfiniteWebby
08-02-2005, 03:00 AM
The server load averages aren't working for me. I put in some flags and it seems that the code is entering the is admin if statement but not entering any of the load average if statements.

I don't know about other people but I would appreciate it heaps if the variables were in the vbulletin options rather than the config file because as simple as it may be I still consider adding lines to your config a file edit and simply opening and ftp program is a pain in the bum.

ShiningArcanine
08-02-2005, 10:48 AM
What do you mean by they aren't working for you? Are they not being displayed? If you're not running Linux/Unix/FreeBSD/OpenBSD/NetBSD that is to be expected.

InfiniteWebby
08-02-2005, 10:52 AM
I am running on a linux server and the server loads are not showing at all...

ShiningArcanine
08-02-2005, 10:55 AM
Did the previous version work? Does your server support exec('uptime') or /proc/loadavg?

InfiniteWebby
08-02-2005, 10:57 AM
Didn't try the previous version and I don't know... probably not by the looks of it.

Boofo
08-02-2005, 11:02 AM
I am running on a linux server and the server loads are not showing at all...

I'm running on a Linux server and they show fine for me. ;)

Blam Forumz
08-02-2005, 11:19 AM
Same here

ShiningArcanine
08-02-2005, 03:42 PM
Didn't try the previous version and I don't know... probably not by the looks of it.

Ask your web host if either method is supported. Chances are both aren't.

Snake
08-02-2005, 05:13 PM
I have upgraded the plugin and members can still view the microstats. Any idea?

Biker_GA
08-02-2005, 05:19 PM
Did you modify config.php?

Snake
08-02-2005, 06:25 PM
Uh no. What do I've to do exactly in confهg.php file?

Biker_GA
08-02-2005, 06:26 PM
Read the instructions at the top?

Snake
08-02-2005, 06:31 PM
$config['Microstats']['adminonly'] = true;

I have placed the above code already in config.php and it is still visible to the members.

ShiningArcanine
08-02-2005, 08:05 PM
I have placed the above code already in config.php and it is still visible to the members.

This a bug in microstats. Basically, I used $config['Microstats']['adminonly'] in microstats's PHP code and vBulletin changes its name to $vbulletin->config['Microstats']['adminonly']. I didn't think such a simple thing needed testing. ^_^;;

I've released version 1.2.1 to fix this bug.

akanevsky
08-02-2005, 08:19 PM
https://vborg.vbsupport.ru/showpost.php?p=669553&postcount=32

https://vborg.vbsupport.ru/showpost.php?p=669474&postcount=30

Thank you very much :banana:

Snake
08-03-2005, 08:32 AM
This a bug in microstats. Basically, I used $config['Microstats']['adminonly'] in microstats's PHP code and vBulletin changes its name to $vbulletin->config['Microstats']['adminonly']. I didn't think such a simple thing needed testing. ^_^;;

I've released version 1.2.1 to fix this bug.

Ha I knew there's a bug somewhere around. :P Thanks.

Snake
08-03-2005, 08:34 AM
Btw, I have upgraded to 1.2.1 and everything but my members say they can still view the microstats. :( Here's how my config.php file looks like.

// ****** SUPER ADMINISTRATORS ******
// The users specified below will have permission to access the administrator permissions
// page, which controls the permissions of other administrators
$config['SpecialUsers']['superadministrators'] = '1';

// ****** MySQLI OPTIONS *****
// PHP can be instructed to set connection paramaters by reading from the
// file named in 'ini_file'. Please use a full path to the file.
// Used to set the connection's default character set
// Example:
// $config['Mysqli']['ini_file'] = 'c:\program files\MySQL\MySQL Server 4.1\my.ini';
$config['Mysqli']['ini_file'] = '';

// ****** MICROSTATS OPTIONS *****
// Setting this variable to anything will make microstats display itself only to administrators.
$vbulletin->config['Microstats']['adminonly'] = 'true';

I have done everything right, so there might a bug somewhere again. ;)

Boofo
08-03-2005, 08:45 AM
Is there a way to move this above the copyright notice with a break in between it and the copyright?

EDIT: Disregard this post. I found it in the first post, sorry. ;)

ShiningArcanine
08-03-2005, 08:30 PM
Btw, I have upgraded to 1.2.1 and everything but my members say they can still view the microstats. :( Here's how my config.php file looks like.



I have done everything right, so there might a bug somewhere again. ;)

That line in config.php should say:

$config['Microstats']['adminonly'] = true;

I did regression testing before I released 1.2.1 so I would be sure that microstats wouldn't have the same bug twice. In my response to your post, I mentioned $vbulletin->config['Microstats']['adminonly'] because vBulletin changes $config['Microstats']['adminonly'] to $vbulletin->config['Microstats']['adminonly'] later in the script but as far as anything in config.php is concerned, the variable is $config['Microstats']['adminonly'].

prawn
08-04-2005, 09:21 AM
Someone knows if the queries executed by attachment.php and image.php are counted as well to the number of queries? Thanks.

Boofo
08-04-2005, 09:36 AM
This was showing in my Admin CP redirect message when I logged into the Admin CP until I moved it up above the copyright message in the footer. Now it doesn't show in the redirect message any more. Is it supposed to work that way? ;)

Snake
08-04-2005, 12:22 PM
That line in config.php should say:

$config['Microstats']['adminonly'] = true;

I did regression testing before I released 1.2.1 so I would be sure that microstats wouldn't have the same bug twice. In my response to your post, I mentioned $vbulletin->config['Microstats']['adminonly'] because vBulletin changes $config['Microstats']['adminonly'] to $vbulletin->config['Microstats']['adminonly'] later in the script but as far as anything in config.php is concerned, the variable is $config['Microstats']['adminonly'].

Thanks, that solved the issue. ;)

ShiningArcanine
08-04-2005, 06:47 PM
Someone knows if the queries executed by attachment.php and image.php are counted as well to the number of queries? Thanks.

No, it is only for the page. Any queries that anything the page links to makes won't be included in the figure.

This was showing in my Admin CP redirect message when I logged into the Admin CP until I moved it up above the copyright message in the footer. Now it doesn't show in the redirect message any more. Is it supposed to work that way? ;)

That would make sense as it looks for the body closing tag by default. When you changed the behavior, you probably didn't add whatever you configured microstats to look for to the redirect message.

Boofo
08-04-2005, 07:47 PM
No, it is only for the page. Any queries that anything the page links to makes won't be included in the figure.



That would make sense as it looks for the body closing tag by default. When you changed the behavior, you probably didn't add whatever you configured microstats to look for to the redirect message.

Ok, that makes sense. I added the line in the config file and told it to look for <!--display microstats here --> and put that above copyright in the footer. That is why it isn't showing up there now. Too bad, though, it was nice to have it there. ;)

ShiningArcanine
08-04-2005, 08:56 PM
Ok, that makes sense. I added the line in the config file and told it to look for <!--display microstats here --> and put that above copyright in the footer. That is why it isn't showing up there now. Too bad, though, it was nice to have it there. ;)

You'll have to modify the template that handles that if you'd like microstats to display its data there. I think the template is STANDARD_REDIRECT but I'm not sure.

Boofo
08-04-2005, 09:16 PM
You'll have to modify the template that handles that if you'd like microstats to display its data there. I think the template is STANDARD_REDIRECT but I'm not sure.

It's not a big deal, I guess. Thanks for clearing it up for me though. Works great! I might even add some more stats to it for my own board. ;)

mOdEtWo
08-05-2005, 10:06 PM
ShiningArcanine;

What do I have to do to get the stats/load to only show for my userID? I'm not sure if I can just wrap a "<if user =...>" conditional around the plugin xml without breaking anything.

ShiningArcanine
08-05-2005, 10:10 PM
ShiningArcanine;

What do I have to do to get the stats/load to only show for my userID? I'm not sure if I can just wrap a "<if user =...>" conditional around the plugin xml without breaking anything.

There are two ways that would work off the top of my head but the best of the two would be simply to modify the plugin and wrap it in an if() statement that contains the appropriate agrument.

mOdEtWo
08-05-2005, 10:47 PM
I'm not really sure how this whole plugin stuff works.

What you are saying is that all plugin xml is pasted into the same spot? Yes, then it would work to just wrap an if-statement around it. I'll try and let you know the results!

Cheers.

ShiningArcanine
08-05-2005, 10:53 PM
I'm not really sure how this whole plugin stuff works.

What you are saying is that all plugin xml is pasted into the same spot? Yes, then it would work to just wrap an if-statement around it. I'll try and let you know the results!


Cheers.

In the plugin manager modify the plugin wrapping it with:

if ($vbulletin->userinfo['userid'] == <insert id no. here>)
{

//plugin here

}

ShiningArcanine
08-05-2005, 10:54 PM
In the plugin manager modify the plugin wrapping it with:

if ($vbulletin->userinfo['userid'] == <insert id no. here>)
{

//plugin here

}

You'll want to replace <insert id no. here> with the id number you want to display microstats to of course.

dbembibre
08-05-2005, 11:08 PM
I have a problem /proc/loadavg exists and is owned by root, in php.ini i have
allow_url_fopen Off in local and Master, and display_errors On.

The @file_get_contents("/proc/loadavg") and @file_exists("/proc/loadavg") always return false. Apache 2 web server is started by user apache. I need turn on any value in my php.ini tu work this plug ????

Thanks a lot for your help

mOdEtWo
08-05-2005, 11:20 PM
Aye, wrapping an if-statement around the plugin xml contents works.

if ($vbulletin->userinfo['userid'] == 28)
{
...
}

FleaBag
08-06-2005, 12:42 AM
Nice addition... Thanks a lot. :)

ShiningArcanine
08-06-2005, 02:51 AM
I have a problem /proc/loadavg exists and is owned by root, in php.ini i have
allow_url_fopen Off in local and Master, and display_errors On.

The @file_get_contents("/proc/loadavg") and @file_exists("/proc/loadavg") always return false. Apache 2 web server is started by user apache. I need turn on any value in my php.ini tu work this plug ????

Thanks a lot for your help

Contact your webhost.

dbembibre
08-07-2005, 11:24 PM
Solved, i need add /proc/loadavg to the open_basedir setting and now work ok

Guest190829
08-13-2005, 09:20 PM
Installed and working great! Good job!

/me clicks install

PING1434a
08-14-2005, 09:33 AM
When attempting to install, it gives Invalid File error. Using 3.5 RC2 which was upgraded from RC1

EDIT!:
Oops, didn't read the instructions right, I'm currently playihng around with 3.5, so I'm still a n00b in using the new plug-in system, I kept trying to install it through the product adding menu instead of plug-in adding meu. :o

poolking
08-14-2005, 05:46 PM
/me installed

Brandon Sheley
08-17-2005, 07:16 AM
worked on my first try again :) i'm starting to like pligins..lol
clicked *install*

Xplorer4x4
08-24-2005, 02:11 AM
What would I have to do in order to drop the server loads? The loads are already listed in the Admin CP so I see no point in displaying it there. However, queris and load times I am interested in. :)

ShiningArcanine
08-24-2005, 09:21 PM
What would I have to do in order to drop the server loads? The loads are already listed in the Admin CP so I see no point in displaying it there. However, queris and load times I am interested in. :)

You'll need to modify the plugin and remove lines 17 through 32.

Xplorer4x4
08-25-2005, 02:10 AM
Work great. :)

Thanks,
X

rinkrat
08-27-2005, 03:42 PM
Can't get much easier to install. I am getting reports of uncached templates and they are in red like it's important. What do I do?

--------- EDIT ----

Found the answer here:

https://vborg.vbsupport.ru/showthread.php?p=614971&highlight=uncached#post614971

Yorixz
09-05-2005, 06:05 AM
Thanks a lot, great addon!

ManagerJosh
09-16-2005, 08:48 AM
Works like a charm! Thanks

Any chance we'll see it resembling like Teck's original microstats hack? :D

https://vborg.vbsupport.ru/showthread.php?t=62173&highlight=microstats

Snake
09-16-2005, 04:19 PM
Yeah that would be great. :D

Oblivion Knight
09-16-2005, 04:30 PM
I'm fairly sure that the MySQL and PHP load percentage would require file edits..

The rest may be possible, not sure about the uncached template dropdown box though.

ShiningArcanine
09-28-2005, 01:00 AM
I'm fairly sure that the MySQL and PHP load percentage would require file edits..

The rest may be possible, not sure about the uncached template dropdown box though.

You're right, it would require file edits, hence why I haven't done it (when I was coding the last 1.x.0 version I went for a kitchen sink approuch).

ManagerJosh
09-28-2005, 02:37 AM
You're right, it would require file edits, hence why I haven't done it (when I was coding the last 1.x.0 version I went for a kitchen sink approuch).

Well personally I don't mind file edits that much :)

southernlady
09-29-2005, 01:49 PM
Btw, installed 3.5 Gold last night and this works. Liz

ManagerJosh
09-30-2005, 04:36 AM
I hope to see in the future:

REGULAR USERS STATS
- percentages of PHP/MySQL usage

ADMINISTRATOR STATS
- number/name of uncached templates (name highlighted in blue, for uncached template)
- vBulletin DEBUG mode status
- server GZIP library compression status

Freezerator
09-30-2005, 05:41 AM
I hope to see in the future:

REGULAR USERS STATS
- percentages of PHP/MySQL usage

ADMINISTRATOR STATS
- number/name of uncached templates (name highlighted in blue, for uncached template)
- vBulletin DEBUG mode status
- server GZIP library compression status

Yes, that would be very helpfull. It's handy to see wich takes the most time, mysql or php :) Don't mind any file edit though :)

Noonster
09-30-2005, 08:15 AM
Mine is showing
- Page generated in 2.57584 seconds with 17 queries

But its not showing the server load... downloaded the file in the first post.

Any ideas.

Cheers
Daz

lylah
09-30-2005, 09:04 PM
Hiiiiiiiiiiiiii

thanx for this hack :)

i just upgraded my vb to 3.5 gold

and i got this messege
--------
(1 queries for uncached templates)
Uncached templates: board_inactive_warning (1
------------

i updated all my plugins and hacks, but still showing this messege :S

please help me :(

Boofo
09-30-2005, 10:43 PM
Hiiiiiiiiiiiiii

thanx for this hack :)

i just upgraded my vb to 3.5 gold

and i got this messege
--------
(1 queries for uncached templates)
Uncached templates: board_inactive_warning (1
------------

i updated all my plugins and hacks, but still showing this messege :S

please help me :(

That's because you still have the board turned off.

ShiningArcanine
10-01-2005, 03:01 PM
Well personally I don't mind file edits that much :)

I've thought about making a hack that microstatus would detect and display data from but I didn't want microstats to lose its simple installation instructions. Perhaps in the future I could post a seperate hack in the code modification forum and say that it requires this plugin as a frontend.

Mine is showing
- Page generated in 2.57584 seconds with 17 queries

But its not showing the server load... downloaded the file in the first post.

Any ideas.

Cheers
Daz

What operating system is your site's server running? Your host might not have something enabled (which is an issue you'll want to speak to him/her about) but I need to know in order to tell you exactly what needs to be enabled. Either that or you're running Windows which microstats cannot report load averages for.

Aeolian_X
10-01-2005, 03:42 PM
Installation doesn't get any easier than this. Great job.

Moparx
10-02-2005, 08:09 PM
I hope to see in the future:

REGULAR USERS STATS
- percentages of PHP/MySQL usage

ADMINISTRATOR STATS
- number/name of uncached templates (name highlighted in blue, for uncached template)
- vBulletin DEBUG mode status
- server GZIP library compression status

agreed 100%. i would really like to see these added as well..

ManagerJosh
10-03-2005, 05:15 AM
I've thought about making a hack that microstatus would detect and display data from but I didn't want microstats to lose its simple installation instructions. Perhaps in the future I could post a seperate hack in the code modification forum and say that it requires this plugin as a frontend.

That's not a bad idea. Make it into an extension :)

tema
10-04-2005, 02:46 PM
sorry for stupid question, but what it means when i see "Uncached templates: forumhome_forumbit_level3_post (3)". Is it bad? How to improve it?

ShiningArcanine
10-04-2005, 08:53 PM
sorry for stupid question, but what it means when i see "Uncached templates: forumhome_forumbit_level3_post (3)". Is it bad? How to improve it?

That isn't really a good thing as an unnecessary query is being run every page view wasting server resources. Where are you seeing this and what version of vBulletin 3.5.0 are you running? There is a file you need to modify to enable caching but before I look into what file that is, I think it would be a better idea to ensure you're running the latest version of vBulletin.

RapCapital
10-05-2005, 05:53 PM
Will this work for 3.0.7?

Moparx
10-05-2005, 06:56 PM
Will this work for 3.0.7?

note the forum you are in: 3.5.0 Plugins :p
there are a few versions for 3.0.x available though, just do a search :)

Snake
10-06-2005, 06:59 PM
ShiningArcanine, is it possible to display the microstats underneath the vB copyright so it should look like this...

Powered by vBulletin Version 3.5.0
Copyright ?2000 - 2005, Jelsoft Enterprises Ltd.

Page generated in 0.43002 seconds with 12 queries [Server Loads: 0.71 0.55 : 0.54]

Moparx
10-06-2005, 07:23 PM
ShiningArcanine, is it possible to display the microstats underneath the vB copyright so it should look like this...

make sure you have the following in config.php:
$config['Microstats']['replacementvariable'] = '<!-- display microstats here -->';

then add <!-- display microstats here --> at the very bottom of the footer template

Snake
10-06-2005, 07:39 PM
Wow thank you. :)

Karri
10-06-2005, 10:35 PM
I just installed this with the addition to the config file so that only admins will see it but all I get is

Page generated in 0.70241 seconds with 10 queries [Server Loads: 3.19 2.19 : 2.25]

and no info about uncached anything. Any suggestions?

Moparx
10-07-2005, 12:21 AM
I just installed this with the addition to the config file so that only admins will see it but all I get is

Page generated in 0.70241 seconds with 10 queries [Server Loads: 3.19 2.19 : 2.25]

and no info about uncached anything. Any suggestions?

you will only see a message regarding uncached templates if you have that problem.
you should be happy you dont see it :)

Karri
10-07-2005, 12:40 AM
so I shouldn't see anything about templates at all if they are all working well, not even how many were used to generate the page? (and if they are I am totally shocked :) ) Because that one line of info is all I get, I thought I was supposed to see info about queries and templates as well.

Thanks!!!!

wolfyman
10-08-2005, 03:33 PM
daddy likes :)

*clicks install*

ShiningArcanine
10-08-2005, 10:55 PM
Will this work for 3.0.7?

You can actually adapt this to 3.0.7 with some modifications and placement of it in the phpinclude_end template but I'll just refer you to Erwin's hack:

https://vborg.vbsupport.ru/showthread.php?t=59700&highlight=Microstats+uncached+templates

Paul M
10-12-2005, 02:00 AM
Downloaded the latest version of this to try and I'm curious - why are the optional settings added to the config.php and not settings in the ACP (vbulletin options) ?

Antivirus
10-12-2005, 11:12 PM
(installed on 3.5.0)
Thanks ShiningArcanine!

ShiningArcanine
10-14-2005, 08:04 AM
Downloaded the latest version of this to try and I'm curious - why are the optional settings added to the config.php and not settings in the ACP (vbulletin options) ?

It can be done but this is supposed to be easy to install, and I'd need to make changes to the database to add settings, which would mean an installer file that I'm not willing to write for the simplicity's sake.

Oblivion Knight
10-14-2005, 08:05 AM
which would mean an installer file that I'm not willing to write for the simplicity's sake.A product .xml file would be capable of doing this.. :)

Boofo
10-14-2005, 08:14 AM
A product .xml file would be capable of doing this.. :)

Show him how it's done, OK. ;)

ShiningArcanine
10-14-2005, 10:54 PM
Show him how it's done, OK. ;)

That would be nice considering I've never seen a product file before.

Oblivion Knight
10-15-2005, 07:02 AM
Here you go, sir. One product, packaged and tested.. :)

I upped the version number to 1.3.0, hope you don't mind.
Also, I changed the replacement variable stuff slightly as vBulletin doesn't seem to like html comments as a default value for a setting.

Rabbitoh Warren
10-15-2005, 08:36 AM
Here you go, sir. One product, packaged and tested.. :)

I upped the version number to 1.3.0, hope you don't mind.
Also, I changed the replacement variable stuff slightly as vBulletin doesn't seem to like html comments as a default value for a setting.

Is it just a matter of uploading the product file to complete installation? Because I just did that and no stats are appearing on my forum.

Oblivion Knight
10-15-2005, 08:46 AM
Is it just a matter of uploading the product file to complete installation? Because I just did that and no stats are appearing on my forum.As mentioned in the setting, you should place the replacement variable in your footer template.. :)

So if you're using the default setup, just put %microstats% after the copyright stuff.

ForYou
10-15-2005, 11:28 PM
Hello ,

when i install the hack ,

it's look like in main page ,

Page generated in 4.64159 seconds with 22 queries (1 queries for uncached templates) [Server Loads: 0.94 0.65 : 0.65]
Uncached templates: forumhome_latestthreadbit (10)

is this correct

Moparx
10-15-2005, 11:57 PM
its working fine. you need to fix the uncached template you have

Rabbitoh Warren
10-17-2005, 01:26 PM
So if you're using the default setup, just put %microstats% after the copyright stuff.Yep, did that and it's working. I as admin can see the stats but my normal users only see the text %microstats%. Any idea how I can fix that?

Oblivion Knight
10-17-2005, 02:07 PM
Yep, did that and it's working. I as admin can see the stats but my normal users only see the text %microstats%. Any idea how I can fix that?Interesting.. I'll have to look into that one tonight.


Edit: Fixed.

Sorry about the inconvenience, the attachment has been updated to 1.3.1 and you should just be able to overwrite it via the Product Manager.. :)

eoc_Jason
10-17-2005, 02:40 PM
Here's one that I made based on the 3.0.x MS hack. I liked how it used the drop-down box style for the cached / uncached templates. Just thought I would share incase someone wanted the older style too. I hard-coded it to use {ms} as the replacement variable, but you can set it to whatever you want quite easily.

Oblivion Knight
10-17-2005, 02:47 PM
Thanks Jason, I'll have a play around with this later - I prefer TECK's layout too.

Joshua5692
10-21-2005, 11:03 PM
This was by far the easiest plug and play add on I have put in yet!

Thanks ShiningArcanine for all your efforts. I installed on 3.5.0 and it is flawless and exactly as described. I do have a question though.

We have a few select members with dual identities, and the fact that they are an administrator is hidden from the public. Their primary group is just a public group. Is there anyway at all that we can allow the administrators who are not in the Admin group as their primary? I am not asking you to modify your release, it is great. But if you could just point me into the right line of code?

ShiningArcanine
10-21-2005, 11:39 PM
This was by far the easiest plug and play add on I have put in yet!

Thanks ShiningArcanine for all your efforts. I installed on 3.5.0 and it is flawless and exactly as described. I do have a question though.

We have a few select members with dual identities, and the fact that they are an administrator is hidden from the public. Their primary group is just a public group. Is there anyway at all that we can allow the administrators who are not in the Admin group as their primary? I am not asking you to modify your release, it is great. But if you could just point me into the right line of code?

I actually did contemplate this when I wrote 1.2.x but I decided against doing it at the time because I didn't want to have so much complexity that the plugin would become bloated. You'll want to find the following line:

if (($vbulletin->config['Microstats']['adminonly'] and $vbulletin->userinfo['usergroupid'] == 6) or !$vbulletin->config['Microstats']['adminonly']){


And change it to

if (($vbulletin->config['Microstats']['adminonly'] and ($vbulletin->userinfo['usergroupid'] == 6 or $vbulletin->userinfo['usergroupid'] == *)) or !$vbulletin->config['Microstats']['adminonly']){


Changing * to the usergroup id.

Joshua5692
10-22-2005, 02:05 AM
Sorry I think you misunderstood my question. But thank you for the quick reply. :)

I was hoping to keep it the admin group only, but not requiring the admin group to be the user's primary group.

Tomek
10-22-2005, 07:18 AM
I hope to see in the future:

REGULAR USERS STATS
- percentages of PHP/MySQL usage

ADMINISTRATOR STATS
- number/name of uncached templates (name highlighted in blue, for uncached template)
- vBulletin DEBUG mode status
- server GZIP library compression status
I fully agree. :)

Dennis B
10-22-2005, 09:49 AM
Great stuff, thanks & installed.

Snake
10-22-2005, 11:49 AM
I fully agree. :)

Me either. That would be cool. :)

eoc_Jason
10-22-2005, 05:17 PM
Tomek, ManagerJosh, Aftermath - adding in templates, debug, and gzip is extremely simple. However, adding in the percentages of PHP/MySQL usage will require file hacking I believe, I do not think it could be done using hooks. Just FYI.

GrendelKhan{TSU
10-27-2005, 11:41 AM
ack!!

mine is appearing below the HEADER!!! (and at the way bottom footer which is fine).
but yikes!!

how do I get NOT to appear below the header (insignia skin is one that it appears below the header in). :/

I didn't change and of the configurations cause...I'm a n00b and didn't understand how/where I was supposed to do so (from the instructions). :( doh!

ShiningArcanine
10-29-2005, 12:05 AM
Tomek, ManagerJosh, Aftermath - adding in templates, debug, and gzip is extremely simple. However, adding in the percentages of PHP/MySQL usage will require file hacking I believe, I do not think it could be done using hooks. Just FYI.

Yeah, the percentages would require file hacking as the plugins are in the database, and there is no way that data in the database (e.g. a hook) could execute before a query has been done.

ack!!

mine is appearing below the HEADER!!! (and at the way bottom footer which is fine).
but yikes!!

how do I get NOT to appear below the header (insignia skin is one that it appears below the header in). :/

I didn't change and of the configurations cause...I'm a n00b and didn't understand how/where I was supposed to do so (from the instructions). :( doh!

Do you still need help?

Joshua5692
10-29-2005, 01:05 AM
Why does the group chosen to see this have to be their primary usergroup?

GrendelKhan{TSU
10-29-2005, 01:37 AM
Do you still need help?


yah. gave up and disable it until I figured it out or someone helped me out. :squareeyed: :nervous:

ShiningArcanine
10-29-2005, 11:33 PM
Why does the group chosen to see this have to be their primary usergroup?

I don't quite understand your question. Everyone can see microstats, except only the administrators (group 1) can see the server loads.

yah. gave up and disable it until I figured it out or someone helped me out. :squareeyed: :nervous:

Open up config.php, put the following on a line, save it and upload it:

E.g. $config['Microstats']['replacementvariable'] = '<!-- display microstats here -->';

Then go to the templates and put "<!-- display microstats here -->" where ever you want microstats to be displayed.

Joshua5692
10-30-2005, 02:07 AM
I don't quite understand your question. Everyone can see microstats, except only the administrators (group 1) can see the server loads.

I am sorry I should have been more clear, thank you again for the reply. I am aware that the admin group can see the server load, but this is only the case if the user's primary usergroup is admin. Those of us who hide our admin status also have the server loads hidden from us.

Is there a way to make it so the that it will appear even if the primary usergroup is not administrators?

mauisun
10-30-2005, 02:33 PM
worked great for me on 3.5 gold r3 :)
...mauisun

Thug
10-30-2005, 11:27 PM
great stuff keep it up

bspiller82
11-01-2005, 06:32 PM
On the stats whats it mean when it says

Uncached templates: adv_portal_ts (1)

ShiningArcanine
11-01-2005, 08:32 PM
I am sorry I should have been more clear, thank you again for the reply. I am aware that the admin group can see the server load, but this is only the case if the user's primary usergroup is admin. Those of us who hide our admin status also have the server loads hidden from us.

Is there a way to make it so the that it will appear even if the primary usergroup is not administrators?

I wasn't aware of this, thanks for bringing it to my attention. I'll have to study more carefully how vBulletin handles this to resolve it. I'm a bit pre-occupied at the moment through so it will be a while until I find time.

On the stats whats it mean when it says

Uncached templates: adv_portal_ts (1)

It means that a hack you installed has uncached templates. You'll want to talk to the hack author about how to fix that as it is hurting your forums' performance.

Omranic
11-06-2005, 10:51 AM
there is a mising (the product name) so if you omport the plugin you don't see it in the plugin manager

hope to fix this

& thanks for this work

ShiningArcanine
11-06-2005, 12:19 PM
there is a mising (the product name) so if you omport the plugin you don't see it in the plugin manager

hope to fix this

& thanks for this work

It is in the plugin manager. It isn't in the product manager through. It never was meant to be as the product manager was introduced after the plugin manager in the betas and release canadiates. It only uses one hook so not having it in there doesn't make it any less easy to remove it.

puertoblack2003
11-06-2005, 02:13 PM
for some reason can not download xml file it'll take to another window with an image logo that's it ....maybe something wrong can some 1 help....lol

maybe to early for me

Omranic
11-07-2005, 09:06 AM
ShiningArcanine
thanks but i think if ypu put the product name that this plugin belogs to as (vbulletin) it will be good & doesn't have a bad side effect :)

bspiller82
11-13-2005, 07:12 AM
Is there a way to add the (% PHP - % MySQL) from the 3.0.7 version?

Dark Riku
11-30-2005, 03:57 AM
Is there a way to define where you want to add this... on my site, my footer is an image, and it looks ugly with it being under the image... could i add this to the top of my footer?

eclectica
12-06-2005, 12:24 PM
How would I modify this plugin version 1.2.1 so that all members could see the server loads as well?

EDIT:

I have found out how to make server loads viewable for every usergroup. In the original xml file, open it with a text editor with word wrap turned off and delete the entirety of line 15:
if ($vbulletin->userinfo['usergroupid'] == 6) {
and on line 44, where there are three closing brackets in a row, you also need to delete one closing bracket as well:
}
or you will get a parse error.

eoc_Jason
12-06-2005, 11:25 PM
Is there a way to add the (% PHP - % MySQL) from the 3.0.7 version?

AFAIK, not without file editing...

kadafi_alive
12-11-2005, 04:21 PM
Hi,

is there a way to exclude the stats on some pages?

Mudvayne
12-14-2005, 06:13 PM
nice hack clicked install

BiReL41r
12-16-2005, 07:58 PM
Any screenshots in ACP or on forum homepage?

Mudvayne
12-17-2005, 05:27 AM
Installed 3 dayz ago but fixed just now.. though i know nothing abt coding thts y i spend 1 hour & edit it now it wont shows to others but admin & developer (btw we hav a usergroup named developer who wokrs on site dev :rolleyes: )

Find:
if ($vbulletin->userinfo['usergroupid'] == 6)
Replace with:
if ($vbulletin->userinfo['usergroupid'] == 6 or $vbulletin->userinfo['usergroupid'] == *)
* is the usergroup id.. replace it with ur own

Find:
if (($vbulletin->config['Microstats']['adminonly'] and $vbulletin->userinfo['usergroupid'] == 6) or !$vbulletin->config['Microstats']['adminonly']){
Replace with:
if (($vbulletin->config['Microstats']['adminonly'] and ($vbulletin->userinfo['usergroupid'] == 6 or $vbulletin->userinfo['usergroupid'] == *)) or !$vbulletin->config['Microstats']['adminonly']){
this modificatoin allready posted by ShiningArcanine (https://vborg.vbsupport.ru/member.php?u=34677).. in Here (https://vborg.vbsupport.ru/showpost.php?p=801621&postcount=150).. I just repost with mine one..
I'm really a newbie but just trying to share my idea :ermm:

Smiry Kin's
12-17-2005, 05:20 PM
Any Release Planed for 3.5.2? or 3.5.*

eoc_Jason
12-17-2005, 08:43 PM
Any Release Planed for 3.5.2? or 3.5.*

This is compatible with all 3.5.x versions. It's very simple code and you can customize it quite easily to suite your needs.

Smiry Kin's
12-17-2005, 09:29 PM
ok thanks man, i will try it in just a sec!

Smiry Kin's
12-17-2005, 09:32 PM
Works Great

*Install

|Jordan|
12-19-2005, 06:50 PM
Great job!

But i have a question; what do the 3 numbers of server loads mean?

Also, any way to show the load on PHP/MySQL ?

BrandiDup
12-19-2005, 10:05 PM
Installed and working perfectly on 3.5.2.

Thank you very much! :nervous:

hotwheels
12-30-2005, 08:19 PM
Hotwheels clicks *installs*

Hotwheels is runny 21 queries............holy cow

vic_jay
12-30-2005, 08:34 PM
Dear Group,

We are running Vbadvanced and vbulletin 3.5. We followed the steps to your directions but we don't see anything on our main page. www.trainhealthy.com.

How do we trouble shoot? Please help.

hotwheels
12-30-2005, 08:51 PM
Just import the plugin via vBulletin's "Download / Upload Plugins" page in the Plugin System in the Admin Control Panel and you're done.

That's it......

TrainHealthy
12-30-2005, 09:16 PM
MY bad, I had plugins off in general settings

hotwheels
12-30-2005, 09:32 PM
should be on the very bottom of your forums page.......if you are using vbulletin.

divided_by_fear
12-30-2005, 10:14 PM
hotwheels lol i must say there some high server loads there too

hotwheels
12-31-2005, 01:25 PM
They are terrible............i thought i was having software issue's, so i upgraded from 3.0.7 to 3.5.2 and the server load's stayed the same. I am now waiting for the member's of my site to let me know if they want us to move to a new server. These load' are killing my site bad.....

Guest210212002
01-25-2006, 04:05 PM
/me clicks install

Megareus Rex
01-25-2006, 09:11 PM
Sorry if this question has been asked before, but...how do I edit where on the page it appears?

EDIT: Nvm...it was in the hack desc.
-.- I'm slow

EDIT AGAIN: What exactly do the server loads mean, and what is a good range?

ShiningArcanine
01-26-2006, 09:04 AM
Sorry if this question has been asked before, but...how do I edit where on the page it appears?

EDIT: Nvm...it was in the hack desc.
-.- I'm slow

EDIT AGAIN: What exactly do the server loads mean, and what is a good range?

It is an average of server load over time. The first is over one minute, the second is over five minutes and the third is over 15 minutes. You'll generally want it to be at or below 1.00 times the number of processors in your site's server.

Megareus Rex
01-26-2006, 10:55 AM
It is an average of server load over time. The first is over one minute, the second is over five minutes and the third is over 15 minutes. You'll generally want it to be at or below 1.00 times the number of processors in your site's server.

Ah, ok, thanks :)

GamerJunk.net
02-01-2006, 04:46 AM
Page generated in 1.37040 seconds with 30 queries [Server Loads: 8.81 8.49 : 9.46]

That's my forumhome. Is that bad to have that many queries?

Snake
02-01-2006, 11:00 AM
Page generated in 1.37040 seconds with 30 queries [Server Loads: 8.81 8.49 : 9.46]

That's my forumhome. Is that bad to have that many queries?

In fact it is. It could slow down your server speed and generate too many mySQL errors, I suppose.

ShiningArcanine
02-01-2006, 01:56 PM
Page generated in 1.37040 seconds with 30 queries [Server Loads: 8.81 8.49 : 9.46]

That's my forumhome. Is that bad to have that many queries?

That query count is a bit excessive. How many plugins are you running?

GamerJunk.net
02-01-2006, 03:46 PM
Look at the page

www.gsnforce.com/forum

I get 49 queries in my showthread page, what is the average that should be there?

crepo
02-07-2006, 11:28 AM
Installed.

I use it with the configsetting:
$config['Microstats']['adminonly'] = true;

But can I use this also for 2 groups? I want give it to admin and supermoderators group.

Thanks for helping.
peter

David_R
02-14-2006, 01:49 PM
thanks works fine,
but i want to display all the information only to administrators and another group ID = 23
how can i acheive same ?

i want to remove/hide guests from viewing the page generated and queries executed line.

Zia
02-14-2006, 02:19 PM
Can we hope an Update of this that will show Gzip stats too??

ShiningArcanine
02-23-2006, 05:19 PM
Installed.

I use it with the configsetting:
$config['Microstats']['adminonly'] = true;

But can I use this also for 2 groups? I want give it to admin and supermoderators group.

Thanks for helping.
peter

You will have to modify the plugin. I thought of having mutiusergroup support but I never implemented it in the last major revision I did.

thanks works fine,
but i want to display all the information only to administrators and another group ID = 23
how can i acheive same ?

i want to remove/hide guests from viewing the page generated and queries executed line.

You will have to modify the plugin.

Can we hope an Update of this that will show Gzip stats too??

I have considered this in the past. Gzip can be set in Apache's configuration and in .htaccess, and I do not know if a way to detect this kind of stuff in PHP exists, so if gzip detection was ever added, it would be misleading and inaccurate. That is why I have decided not to include it in microstatus; at least the one that I maintain anyway.

djwins
03-01-2006, 06:49 AM
/clicks install
I tried both the original version and the product version (https://vborg.vbsupport.ru/showpost.php?p=796155&postcount=140) but even as admin (usergroup 6), i can't see the server load and uncached templates.

I'm on 3.5.4

Any ideas?

Also, is there supposed to be an Admin CP for the product version (showpost.php?p=796155&postcount=140)? If so, I can't find it.

ShiningArcanine
03-01-2006, 09:46 PM
djwins, uncached templates only appear if there are uncached templates. Also, microstats can only display server loads on non-Windows servers. If you are on a Windows server, you will not see server loads.

By the way, microstats does not add anything to the AdminCP.

djwins
03-01-2006, 10:40 PM
I am using FreeBSD, not windows. Is the load supposed to display with that? Thanks!

ShiningArcanine
03-02-2006, 09:18 PM
FreeBSD is supposed to show load averages. They might not be enabled on your server though. File a support ticket with your host and ask them if your server supports the following:

$loadavg = @`sysctl vm.loadavg|cut -d" " -f3-5`)

There is a chance they have it disabled at their end.

djwins
03-03-2006, 06:33 AM
It is enabled as the above command works from SSH.
I'm running in PHP safe mode, so thats probably the reason it's not working.

ShiningArcanine
03-03-2006, 05:44 PM
It is enabled as the above command works from SSH.
I'm running in PHP safe mode, so thats probably the reason it's not working.

File a support ticket with your host asking them why this does not work in PHP.

Edit: If you are on a dedicated server or virtual private server, you could try running PHP in normal mode and see if that is the problem.

SaN-DeeP
03-13-2006, 04:41 AM
I am not sure what mistake i am doing, but I need to display page generated and queries executed message only to administrator group..

confused... can some provide some insight since new to vb 3.5.4 and need to get some forums up and running with required addons asap ?

just let me know the appropriate code to modify with ?

SaN-DeeP
03-13-2006, 04:42 AM
thanks in advance for this handy addon :)

ShiningArcanine
03-13-2006, 08:02 PM
Yourwelcome. You will want to find:

$debughtml = '<center><span class="smallfont">Page generated in <b>' . $totaltime . '</b> seconds with <b>' . $vbulletin->db->querycount . '</b> queries';

if ($vbulletin->userinfo['usergroupid'] == 6) {

...

}

$debughtml .= "</span></center>";

And make it:

if ($vbulletin->userinfo['usergroupid'] == 6) {

$debughtml = '<center><span class="smallfont">Page generated in <b>' . $totaltime . '</b> seconds with <b>' . $vbulletin->db->querycount . '</b> queries';

...

$debughtml .= "</span></center>";

}

I would post more detailed instructions but dinner is ready and I am starving. Let me know if this helps.

pauloo
03-25-2006, 08:14 AM
I have changed a server ( asmallorange ) and the time is sometime negatif
Page genered in -0,89474 seconds with 11 queries ...

strange !
What's solution ?

Thank you

ShiningArcanine
03-26-2006, 05:01 PM
That is strange. My site is hosted at ASO without any problems. What server at ASO are you on?

pauloo
03-26-2006, 08:45 PM
My server is Jin shared

pauloo
03-26-2006, 10:16 PM
THis server have a littel problem with hours. It's not stable. I think is th e problem and not your hack ;)

ShiningArcanine
03-27-2006, 11:23 PM
You might want to file a support ticket with A Small Orange then.

Sidewindr
03-28-2006, 12:13 AM
Just a query, If I have templates coming up as uncached how would I change things so they are cached ?

Coldhands
04-03-2006, 06:06 PM
:banana: I was install #500!!!!!!!!!!!!!!!!

DementedMindz
04-19-2006, 12:04 PM
is there anyway to put this under the vbulletin copyright?

carlosacgj
04-20-2006, 04:19 PM
i can'r see the Server loads

ShiningArcanine
04-20-2006, 06:09 PM
DementedMindz, use $config['Microstats']['replacementvariable'], there are instructions above.

Carlosacgj, if you are using Windows, microstats cannot display the server loads.

DementedMindz
04-20-2006, 06:30 PM
opps sorry.... i didnt see thank you

csidlernet
04-21-2006, 08:57 AM
great work, thanks.

Trana
04-27-2006, 02:14 PM
How do I determine what the queries are and what modules/hacks require them?

ShiningArcanine
04-29-2006, 08:23 PM
This is beyond the scope of microstats, but try using vBulletin's debug mode to find out what the queries being made are. You could also try disabling products/plugins to see if queries disappear when they are disabled.

Eagle Creek
05-04-2006, 08:19 PM
It doesn't display the serverloads? Neither in the admin panel?

FiX
05-09-2006, 05:17 PM
Hi.

I#ve removed the Plugin, but the stats still show up. Any idea whats going wrong? :S

I also tried to re-add the plugin and modified some text "page generated" but the changed text does not show up. it seems as if it somehow is somewhere else, but i cant find it

also if I deactivate the plugin system it still show up. other hacks I installed and thought could be the problem ist a template cache system, but I've deleted all cached templates...

hilfe-forum
05-13-2006, 11:59 AM
Works fine:

Page generated in 1,71435 seconds with 87 queries [Server Loads: 2.15 2.10 : 1.98]

Install...

THX!!

RMS-Chef
05-13-2006, 02:05 PM
87!!!!! woah

Snake
05-13-2006, 03:27 PM
Works fine:

Page generated in 1,71435 seconds with 87 queries [Server Loads: 2.15 2.10 : 1.98]

Install...

THX!!
Jesus christ!

hilfe-forum
05-13-2006, 05:20 PM
Jesus christ!

no prob.. have a gooood Server..

much is this...


http://www.hilfe-forum.eu/vbgooglemaphse.php

Page generated in 0,21881 seconds with 178 queries [Server Loads: 3.96 3.99 : 4.22]

but OT

Point someone as I to find out can which Querries that are? If one something to somehow save there can...
Sorry for my babelfish english

ShiningArcanine
05-15-2006, 10:38 PM
It doesn't display the serverloads? Neither in the admin panel?

You are probably on a Windows server. That would be normal behavior as server load averages do not exist under Windows.

Hi.

I#ve removed the Plugin, but the stats still show up. Any idea whats going wrong? :S

I also tried to re-add the plugin and modified some text "page generated" but the changed text does not show up. it seems as if it somehow is somewhere else, but i cant find it

also if I deactivate the plugin system it still show up. other hacks I installed and thought could be the problem ist a template cache system, but I've deleted all cached templates...

I do not know how that could be happening. Did you modify your templates? Have you tried contacting vBulletin support as if you uninstalled the plugin, it should be gone.

Snake
05-16-2006, 07:42 AM
Strange. It just shows the page generation and SQL queries. What about the server load and all that?

"Page generated in 0.41221 seconds with 17 queries"

ShiningArcanine
05-16-2006, 10:55 PM
Chances are you are on a Windows server. Server load averages only exist on *nix and BSD servers.

Snake
05-17-2006, 12:31 PM
But it used to display the server load averages when I first installed the hack. Weird!

ShiningArcanine
05-17-2006, 11:13 PM
Perhaps your host did something to the server your website is on. Try filing a support ticket with them.

Snake
05-18-2006, 09:15 PM
Alright will do that.

Thanks for your reply though!

BeaLzeBuB
05-29-2006, 12:54 AM
Page generated in 1.51093 seconds with 17 queries(1 queries for uncached templates) [Server Loads: 4.75 4.04 : 4.01]
Uncached templates: welcome_headers (1)

firstly thank you

and..

what is "uncached templates" means?

ShiningArcanine
05-29-2006, 07:06 AM
It means that the welcome_headers template is not being cached by vBulletin and an additional query is being generated to fetch it. You might want to talk to the author of the welcome_headers plugin about it.

BeaLzeBuB
05-29-2006, 12:16 PM
fixed.

thanks for Lizard King and ShiningArcanine

Eagle Creek
05-29-2006, 04:25 PM
You are probably on a Windows server. That would be normal behavior as server load averages do not exist under Windows.


No, it isn't Windows..

It used to display the server load averages when I first installed the hack. But it doesn't show them anymore :(.

Sidewindr
05-29-2006, 11:59 PM
fixed.

thanks for Lizard King and ShiningArcanine

How did you fix it?? .. I am having the same report for anotehr mod.

ShiningArcanine
05-30-2006, 07:07 AM
No, it isn't Windows..

It used to display the server load averages when I first installed the hack. But it doesn't show them anymore :(.

File a support ticket with your host.

Hornstar
06-02-2006, 05:46 AM
Question. What does all these stats mean?

Page generated in 0,71435 seconds with 34 queries [Server Loads: 0.65 0.50 : 0.58]

Those stats are not mine, only an example.

What are good stats? What should we be really looking for? and when is it time to think about getting rid of hacks, or upgrading server.

Thanks

KOKS@LN
06-06-2006, 06:05 PM
Hi,
Thanks for this great plugin. Installed on a vB 3.5.4 forum.
I've a problem. The stats are shown twice, one under the other on the forumhome page. The other pages are not affected by this issue.

I found out what causes this problem. In FORUMHOME template, I use a popup code for a FlatCast Radio Server. The code is as following.

<!-- FlatCast Code --->
<body LANGUAGE=javascript onload="window.open ('http://www.********.com/Player.aspx?sid=******','_blank','scrollbars=yes,m enubar=no,width=900,height=600,left=0,top=0');retu rn;"></body>
<!-- FlatCast Code --->

Even though I've changed the place of the code in the same template, the stats are still shown twice (one is shown in where FlatCast code resides).
It seems to me that the </body> tag in the FlatCast code causes the problem.

Does anybody know how to sort this out?

Thanks.

Eagle Creek
06-06-2006, 06:21 PM
Question. What does all these stats mean?

Page generated in 0,71435 seconds with 34 queries [Server Loads: 0.65 0.50 : 0.58]

Those stats are not mine, only an example.


What are good stats? What should we be really looking for? and when is it time to think about getting rid of hacks, or upgrading server.

Thanks

A normal indexpage should be loaded before 1 second and should not have 'too many' query's. But that depens on the amound of hacks installed.

Server loads should not be higer then 3.0 at all time. (except when you are asking extreme things like making MYSQL dumps, etc..).
If your serverload is very high and the page load is slow this isn't immediate a problem. Only is this problem occurs every day you should consider talking to your webhost for processess going crazy, or maybe upgrading.

ShiningArcanine
06-06-2006, 11:15 PM
Hi,
Thanks for this great plugin. Installed on a vB 3.5.4 forum.
I've a problem. The stats are shown twice, one under the other on the forumhome page. The other pages are not affected by this issue.

I found out what causes this problem. In FORUMHOME template, I use a popup code for a FlatCast Radio Server. The code is as following.

<!-- FlatCast Code --->
<body LANGUAGE=javascript onload="window.open ('http://www.********.com/Player.aspx?sid=******','_blank','scrollbars=yes,m enubar=no,width=900,height=600,left=0,top=0');retu rn;"></body>
<!-- FlatCast Code --->

Even though I've changed the place of the code in the same template, the stats are still shown twice (one is shown in where FlatCast code resides).
It seems to me that the </body> tag in the FlatCast code causes the problem.

Does anybody know how to sort this out?

Thanks.
Try removing the extra body tag. You could also try using the "Optional config.php Variable" I outlined above.

eclectica
06-07-2006, 11:55 PM
For some of you who are not seeing the server loads, check that you are in the usergroupid 6, which is the admin usergroup by default. But if you had made another group with a different id number as admin, the hack won't show server loads for that group. To fix that you can then edit the xml file to change the 6 to whatever your admin useridgroupid is.

Also see this post where I figured out a way to show the server loads to all usergroups:
https://vborg.vbsupport.ru/showpost.php?p=841699

Has anyone tested this hack on vBulletin 3.6? Please post here.

havefun
06-11-2006, 04:00 PM
THX 4 it.

helped me out to find 1 plugin that made my board more
than one sec. slower :D

eclectica
06-11-2006, 10:47 PM
Today is the one year anniversary of the modification.

This hack was updated June 9th according to the first post. Also I received an email June 9th that said the following:

ShiningArcanine has updated their hack:

Microstats - load times, server loads, queries, uncached templates
https://vborg.vbsupport.ru/showthread.php?threadid=82900

This is the update that the user gave:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I uploaded a product file of microstats today that supercedes the plugin file.

If you have the plugin installed, there is no need to upgrade as there are no changes other than the usage of the product manager.

In the event of a future release, you will want to remove the old plugin from the plugin manager and upload the new product in the product manager.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Yours,
vBulletin.org Forum team