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
vBMicrostats Details »»
vBMicrostats
Version: 1.0.5, by TECK TECK is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Version: 3.5.4 Rating:
Released: 05-18-2006 Last Update: 05-21-2006 Installs: 92
Uses Plugins Template Edits
Code Changes  
No support by the author.

Finally, the vBMicroStats product for vBulletin 3.5.4 is here.
The previous versions of my mod were very solicited by vBulletin administrators...
I hope you will enjoy this new version as much you did the other ones.

Looking for VB 3.6.x version? It is here.

This mod with add at the bottom of each vBulletin (powered) page, the statistics listed below.
Also, it will help you troubleshoot and optimize your vBulletin board by viewing or comparing PHP/MySQL options and other statistics that are normally hidden in your forum pages.

Regular Users:
? Load time of specified page in microseconds
? Number of queries executed
? PHP percent page usage
? MySQL percent page usage

Administrators Only:
? Server memory usage per page (in Kb)
? DEBUG mode status
? Browser GZIP library compression status
? Server average loads
? Uncached templates (useful to troubleshoot the code)

The code modifications listed below were tested into a clean installed vBulletin board. They work 100%.
If you encounter any problems, feel free to post your questions here.

Step by step install instructions are posted into vbmicrostats.html file.
In order to perform an efficient modification of your files, I recommend you to use Dreamweaver (Coder Mode) or Textpad.
Both editors will allow you to complete all steps without any coding errors.

I tried to use the plugin system as much as I could, in order to avoid any unnecessary code modifications.
In order to set the right query execution time, you will need to perform 2 small code changes to each of the following files:
? class_core.php (folder /includes)
? init.php (folder /includes)

The code changes are very safe and designed not to interfere in any way with the vBulletin performance/functionality.
Make sure you modify, save and upload one file at the time to your server.
Then, simply run the product-plugin_vbmicrostats.xml file.

Once the product installed, don't forget to enable it.
Go to your vBulletin Options, click on BB MicroStats setting group and set all your options.

Show Your Support

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

Comments
  #122  
Old 05-26-2006, 04:26 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

But it shouldn't be going into negative numbers should it? And I also notice when they get really high, the page takes forever to load.
Reply With Quote
  #123  
Old 05-26-2006, 04:42 PM
DementedMindz DementedMindz is offline
 
Join Date: Jan 2006
Posts: 1,474
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Boofo
Is it normal for this:



to flucuate to this:



constantly? That is the report bad post page (with 7 queries) and it seems to go back and forth with almost every page refresh, or two. Not complaining, Teck, just curious.

EDIT: Well, I just had this one show up on the same page:




i seen that too i think its vbulletin itself.... cause mine is doing the same thing every so many pages loads too it never really reads the same...
Reply With Quote
  #124  
Old 05-26-2006, 08:28 PM
TECK's Avatar
TECK TECK is offline
 
Join Date: Nov 2001
Location: Canada
Posts: 4,182
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Boofo
But it shouldn't be going into negative numbers should it?
Yes, it should go into negative values Bobby, because we only count the query execution time.
Once we have that specific value, we deduct from it the script start time, in order to obtain the the PHP execution time.

Let's don't count the DB connection time, first. In init.php, find this line:
Code:
$db->mstimer_stop();
Replace it with:
Code:
$db->mstimer_stop(false);
Then let me know if the time is also erratic. The code mod will not add anymore how long it takes to do the DB connection to the total SQL/query execution time. I belive the time will still be erratic, only smaller values will be processed for SQL.
One more time, vBMicroStats reads ONLY what is happening behind the script, it does not affect in anyway the vBulletin functionment.

Make me a favor. Disable vBMicroStats (code, etc.), enable the debug mode and look at the explained pages, while refreshing the page several times, the same way you do now with vBMicroStats enabled.

Post the results here. On my forums, they are almost identical in both cases.
However, we need to find out why we get SQL spikes once in a while.
With SQL is simple, you cannot have SOMETIMES certain results. Is either NEVER or ALL THE TIME.
Reply With Quote
  #125  
Old 05-26-2006, 10:38 PM
HakkieDEV HakkieDEV is offline
 
Join Date: Jun 2004
Posts: 62
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great mod!

But, how come the server avarages aren't showing up? I have it setup correctly in the adminCP.

Also, on vb3.0.x it always did show.

(to clearify, all other functions seem to be working allright)
Reply With Quote
  #126  
Old 05-27-2006, 02:11 AM
TECK's Avatar
TECK TECK is offline
 
Join Date: Nov 2001
Location: Canada
Posts: 4,182
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You used my vBMicroStats for VB 3.0? It should show, it's the same code.
Let me know... maybe you changed the server software since then?
I will post a fix once I have more info from you.
Reply With Quote
  #127  
Old 05-28-2006, 03:53 PM
Raptor Raptor is offline
 
Join Date: Nov 2001
Posts: 499
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by HakkieDEV
Great mod!

But, how come the server avarages aren't showing up? I have it setup correctly in the adminCP.

Also, on vb3.0.x it always did show.

(to clearify, all other functions seem to be working allright)
i have the very same problem

using 3.5.4 - didnt use any previous hacks
Reply With Quote
  #128  
Old 05-28-2006, 07:40 PM
TECK's Avatar
TECK TECK is offline
 
Join Date: Nov 2001
Location: Canada
Posts: 4,182
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

In vBMicroStats Global Hook, find:
Code:
		if ($vbulletin->options['vb_mstats_server'] AND $stats = @exec('uptime 2>&1') AND trim($stats) != '' AND preg_match("#: ([\d.,]+),?\s+([\d.,]+),?\s+([\d.,]+)$#", $stats, $regs))
		{
			$regs[1] = vb_number_format($regs[1], 2);
			$regs[2] = vb_number_format($regs[2], 2);
			$regs[3] = vb_number_format($regs[3], 2);
			$server_status = '<strong>' . $regs[1] . '</strong> : ' . $regs[2] . ' : ' . $regs[3] . ' | ';
		}
Replace it with:
Code:
		if ($vbulletin->options['vb_mstats_server'])
		{
			if ($stats = @exec('uptime 2>&1') AND trim($stats) != '' AND preg_match("#: ([\d.,]+),?\s+([\d.,]+),?\s+([\d.,]+)$#", $stats, $regs))
			{
				$regs[1] = vb_number_format($regs[1], 2);
				$regs[2] = vb_number_format($regs[2], 2);
				$regs[3] = vb_number_format($regs[3], 2);
				$server_status = '<strong>' . $regs[1] . '</strong> : ' . $regs[2] . ' : ' . $regs[3] . ' | ';
			}
		}
The original code works. Let me know if that fix it.
Reply With Quote
  #129  
Old 05-28-2006, 09:49 PM
Raptor Raptor is offline
 
Join Date: Nov 2001
Posts: 499
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

not for me

here is what my output is with ALL options set to yes

Page generated in 0.44428802 seconds (91.86% PHP - 8.14% MySQL) with 7 queries
3,737.15KB Used | DEBUG Mode OFF | GZIP ON (level 1) | NO Uncached Templates
Reply With Quote
  #130  
Old 05-28-2006, 11:56 PM
TECK's Avatar
TECK TECK is offline
 
Join Date: Nov 2001
Location: Canada
Posts: 4,182
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Raptor, if I understand correctly, you see the server loads into your Admin CP, but not into every page?
It just doesn't make sense. It was working perfectly for everyone, all of the sudden we have 2 members letting me know the server loads are not showing.
The original version should work perfectly, no code mod needed.

It's working perfectly on my server.
Anyone else have the server loads showing with the latest version?
Reply With Quote
  #131  
Old 05-29-2006, 12:03 AM
Tulsa Tulsa is offline
 
Join Date: Jul 2005
Location: Broken Arrow, Oklahoma
Posts: 475
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Possibly not ticked in the admincp to show?
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 05:27 AM.


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.08937 seconds
  • Memory Usage 2,323KB
  • 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
  • (4)bbcode_code
  • (3)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
  • (2)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