![]() |
Microstats - load times, server loads, queries, uncached templates
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 |
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.
|
Good work ShiningArcanine!
|
Nice work!
|
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? |
nice job ShiningArcanine
|
I was waiting for this one. :)
|
Quote:
|
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 |
Quote:
I as the admin am the only member and yes, Admin is default group 6. EDIT: I even took out Code:
if ($vbulletin->userinfo['usergroupid']==6) |
Are you on windows? Windows wont show server loads. Also can we get debug info and gzip level in here for admins?
|
Quote:
As for gzip, I'm not sure if it can be accurately detected as it can be enabled via .htaccess. |
Quote:
Like I said, I have the vB3.x.x version running fine on my public board. |
You need to redo this part right here.
PHP Code:
|
Works like a charm! Thanks
|
Quote:
|
Yea it's a nice plugin but it just makes me feel like it's lacking a bit of info.
/me clicks install |
Quote:
Quote:
|
Quote:
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. :) |
Is it possible to move where the stats show up?
|
Quote:
|
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: |
Quote:
|
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. |
Quote:
Try just saving the file from IE. Nice plugin! |
Quote:
|
Nice. :)
But I would do a little cosmetic change. Find: PHP Code:
PHP Code:
|
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. |
Screenshot! Screenshot! Where is it?! :D lol
|
screen shot! :banana:
|
Oh great. Thanks for that. :D
|
Jesus that is a high server load :eek:
Take a look at mine :) Satan |
That is nice!!!
|
Quote:
|
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. |
Quote:
By the way, are there any configuration differences between the two forums PHP wise or is everything the same? |
100% the same.
|
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. |
Yup.
|
Quote:
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. |
All times are GMT. The time now is 04:52 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|