Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Microstats - load times, server loads, queries, uncached templates Details »»
Microstats - load times, server loads, queries, uncached templates
Version: 1.2.1, by ShiningArcanine ShiningArcanine is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Version: 3.5.4 Rating:
Released: 06-10-2005 Last Update: 06-08-2006 Installs: 680
Uses Plugins
 
No support by the author.

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

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #22  
Old 06-13-2005, 11:54 PM
ShiningArcanine ShiningArcanine is offline
 
Join Date: May 2003
Posts: 105
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Dan
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.
Reply With Quote
  #23  
Old 06-14-2005, 12:35 PM
jancarlo jancarlo is offline
 
Join Date: Feb 2003
Location: Italia
Posts: 97
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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:
Reply With Quote
  #24  
Old 06-16-2005, 09:45 PM
ShiningArcanine ShiningArcanine is offline
 
Join Date: May 2003
Posts: 105
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by jancarlo
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?
Reply With Quote
  #25  
Old 06-16-2005, 10:31 PM
Tomek Tomek is offline
 
Join Date: Oct 2004
Location: Germany, Paderborn
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #26  
Old 06-18-2005, 07:07 AM
dreck's Avatar
dreck dreck is offline
 
Join Date: Nov 2004
Location: Pickens SC
Posts: 182
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by jancarlo
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!
Reply With Quote
  #27  
Old 06-18-2005, 12:25 PM
ShiningArcanine ShiningArcanine is offline
 
Join Date: May 2003
Posts: 105
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by WiBu
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.
Reply With Quote
  #28  
Old 06-18-2005, 12:41 PM
Tomek Tomek is offline
 
Join Date: Oct 2004
Location: Germany, Paderborn
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice.

But I would do a little cosmetic change.

Find:
PHP Code:
$serverload ' [Server Loads: <b>' $regs[0] .'</b> ' $regs[1] . ' : ' $regs[2] . ']'
Replace with:
PHP Code:
$serverload ' [Server Loads: <b>' $regs[0] .'</b> : ' $regs[1] . ' : ' $regs[2] . ']'
You have to change this two times.
Reply With Quote
  #29  
Old 06-18-2005, 01:04 PM
sHORTYWZ sHORTYWZ is offline
 
Join Date: Jan 2002
Posts: 77
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #30  
Old 06-19-2005, 01:18 PM
Snake's Avatar
Snake Snake is offline
 
Join Date: Mar 2005
Location: Cleveland, OH
Posts: 3,832
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Screenshot! Screenshot! Where is it?! lol
Reply With Quote
  #31  
Old 06-20-2005, 05:16 AM
dreck's Avatar
dreck dreck is offline
 
Join Date: Nov 2004
Location: Pickens SC
Posts: 182
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

screen shot! :banana:
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:31 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05609 seconds
  • Memory Usage 2,317KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_php
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete