vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   vBMicrostats (https://vborg.vbsupport.ru/showthread.php?t=116027)

Boofo 05-26-2006 04:26 PM

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.

DementedMindz 05-26-2006 04:42 PM

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...

TECK 05-26-2006 08:28 PM

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.

HakkieDEV 05-26-2006 10:38 PM

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)

TECK 05-27-2006 02:11 AM

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.

Raptor 05-28-2006 03:53 PM

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

TECK 05-28-2006 07:40 PM

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.

Raptor 05-28-2006 09:49 PM

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

TECK 05-28-2006 11:56 PM

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?

Tulsa 05-29-2006 12:03 AM

Possibly not ticked in the admincp to show?

TECK 05-29-2006 12:35 AM

Tulsa, do you have the latest version installed and the server loads are displaying correctly?

Tulsa 05-29-2006 02:07 AM

Yes, I started with this latest version and it works great. Now I don't get the memory stats with php4 but I do with php5. So everything appears to be functioning properly on my site.

I think this hack is great. Couldn't tell you how many things I've gone in and tweaked to make everything more efficient because of this little jewel.

Darwinist 05-29-2006 03:57 AM

Quote:

Originally Posted by TECK
Anyone else have the server loads showing with the latest version?

Everything works 100% perfectly for me. :up:

COBRAws 05-29-2006 05:14 AM

Quote:

Originally Posted by pgt91
Everything works 100% perfectly for me. :up:

Same here :up:

Mario.D 05-29-2006 01:47 PM

Im getting this

Page generated in 0.06948209 seconds (70.36% PHP - 29.64% MySQL) with 12 queries
2,421.72KB Used | DEBUG Mode OFF | GZIP ON (level 1) | NO Uncached Templates

goin to enable php5 and se if there are any diference.

Mario.D 05-29-2006 02:47 PM

No change, there do i find the setting to enable vb debug mode?

TECK 05-29-2006 11:08 PM

Quote:

Originally Posted by Tulsa
Now I don't get the memory stats with php4 but I do with php5.

Stay with PHP5.
You don't see the memory stats in PHP4 because it was not compiled with enable-memory-limit option.

kellyandmike 05-30-2006 03:41 PM

I downloaded the zip file and in it were two things:
1 • product-plugin_vbmicrostats and
2 • vbmicrostats (an html file, instructions)
• class_core.php (folder /includes) was NOT in the zip
• init.php (folder /includes) was NOT in the zip

Am I missing something or is the zip???

TECK 05-30-2006 05:20 PM

Look into your forum /includes folder. ;)

kellyandmike 05-30-2006 07:42 PM

Duh, Thanks. I will leave that post just so others who are having brain farts won't have to post...

kellyandmike 06-01-2006 12:13 PM

I installed it and here is what it says at the bottom of the page for two different page loads...

Page generated in 1.477 seconds (23.55% PHP - 76.45% MySQL) with 9 queries

Page generated in 2.044 seconds (-3.44% PHP - 103.44% MySQL) with 11 queries

Page generated in 4.277 seconds (-19.53% PHP - 119.53% MySQL) with 12 queries

What do these numbers mean?

Boofo 06-01-2006 12:30 PM

Quote:

Originally Posted by kellyandmike
I installed it and here is what it says at the bottom of the page for two different page loads...

Page generated in 1.477 seconds (23.55% PHP - 76.45% MySQL) with 9 queries

Page generated in 2.044 seconds (-3.44% PHP - 103.44% MySQL) with 11 queries

Page generated in 4.277 seconds (-19.53% PHP - 119.53% MySQL) with 12 queries

What do these numbers mean?

Follow the instructions in this post. That fixed this problem for me, so far.

https://vborg.vbsupport.ru/showpost....&postcount=123

kellyandmike 06-01-2006 03:23 PM

Wow, Just did it and that helped the speed of the page loads immediately!

kellyandmike 06-01-2006 04:05 PM

I think I spoke too fast. It was really fast at first and now it's slow again. This just stinks! Any other suggestions?

kissythecutie 06-02-2006 08:23 AM

sorry iam a newbie but what is the reak benefit of this hack

TECK 06-02-2006 11:47 AM

Quote:

Originally Posted by kellyandmike
I think I spoke too fast. It was really fast at first and now it's slow again.

This mod does not modify the time it takes to load a page. It reads it only.

phkk 06-02-2006 04:36 PM

Quote:

Originally Posted by TECK
If you get results like:
Page generated in 3.35731196 seconds (9.05% PHP - [high]90.95%[/high] MySQL) with 17 queries
You probably use a bad piece of code, because vBulletin will never generate those extreme results.
Imagine this: the code uses only 10% the resources to read the actual PHP code and the rest of 90% is used only to scan the tables... WOW!
That means the code forces to read into the database for each user who visits the site at this percentage... if you have 1000 users viewing the page in the same time.. you can get a picture of it...
If you compare this with vBulletin, the software does the opposite, 90% PHP and 10% MySQL... the right way.


how can we fix it?

I have bad piece of code

Page generated in 2.74304891 seconds (62.81% PHP - 37.19% MySQL) with 22 queries

:down: :down: :down: :down: :down:

TECK 06-03-2006 06:36 AM

Quote:

Originally Posted by Boofo
Follow the instructions in this post. That fixed this problem for me, so far.

https://vborg.vbsupport.ru/showpost....&postcount=123

It looks like the wierd times are comming from future. Scott and Freddie are looking into this problem...
It might be related to the time it takes to count the connection execution, that's the reason I asked you to disable it for now.

I'm waiting on Scott to give more feedback on vBulletin's behaviour.
http://www.vbulletin.com/forum/bugs3...iew&bugid=2481

Boofo 06-03-2006 09:36 AM

Quote:

Originally Posted by TECK
It looks like the wierd times are comming from future. Scott and Freddie are looking into this problem...
It might be related to the time it takes to count the connection execution, that's the reason I asked you to disable it for now.

I'm waiting on Scott to give more feedback on vBulletin's behaviour.
http://www.vbulletin.com/forum/bugs3...iew&bugid=2481

Well, it seems to be working right for now with that disabled. ;)

CP, 06-03-2006 11:29 PM

Hi its ive installed it without any errors or anything but for me nothing is showing, ive enabled it also :(

NeRilkA 06-04-2006 08:50 PM

hi,

i installed the hack on my test forum, and it works but i have errors at the top on the page :

Quote:

Warning: Division by zero in /includes/functions.php(4367) : eval()'d code on line 63

Warning: Division by zero in /includes/functions.php(4367) : eval()'d code on line 64
i attached a capture of my screen

thanks for your help

apn3a 06-05-2006 05:47 AM

hi, i've installed vBMircostats, excellent work TECK.

I'm getting a high number regarding queries. i see everyone is getting 5-15 but i'm getting 30+ most of the times, especially when i browse my forum's threads.

Page generated in 1,14650702 seconds (46,75% PHP - 53,25% MySQL) with 32 queries

does anyone know how to fix this?

thank you in advance

Boofo 06-05-2006 08:56 AM

Quote:

Originally Posted by apn3a
hi, i've installed vBMircostats, excellent work TECK.


I'm getting a high number regarding queries. i see everyone is getting 5-15 but i'm getting 30+ most of the times, especially when i browse my forum's threads.

Page generated in 1,14650702 seconds (46,75% PHP - 53,25% MySQL) with 32 queries

does anyone know how to fix this?

thank you in advance

The only way to fix that is un-install some of the hacks you have installed.

Boofo 06-05-2006 09:01 AM

Quote:

Originally Posted by TECK
PhotoPost does not use the vBulletin $output, then?
This code line (in vBMicroStats Global Hook) should help you:
Code:

$output = str_replace('{microstats}', $ms_output, $output);
$output is the vBulletin html code output and $ms_output is the MicroStats one.
The code line listed above with search in the $output for the {microstats} string and replace it with the actual $ms_output html code.
Probably you have a mod installed that merges PhotoPost with vBulletin?
I'm not familiar with this software, so unfortunatelly I could not support it.
I wish I could help you more.

Maybe other members who have experience with PhotoPost could help you better.
I would post this question in the vB3.5 Modification Questions forum.
It shouldn't be hard to fix your problem.

If you have an answer, please post it here so I can link it in the first post.
Thanks. :)

BTW, 27 installs in 12 hours? Thank you! It really means a lot to me.

Mine isn't working in Photopost either. It just shows the {microstats} instead of the infornation. I have my Photopost directory set up in the same dirctory as the forums, not underneath it, though, so could that be it?

TECK 06-05-2006 07:43 PM

Quote:

Originally Posted by NeRilkA
hi,

i installed the hack on my test forum, and it works but i have errors at the top on the page :
... Division by zero ...
i attached a capture of my screen

thanks for your help

Try this. Open the vBMicroStats Global Hook and find this code:
Code:

$total_time = vb_number_format($end_time[0]
Replace it with:
Code:

$total_time = number_format($end_time[0]
Let me know if that fixed the problem.

TECK 06-05-2006 07:51 PM

Quote:

Originally Posted by Boofo
Mine isn't working in Photopost either. It just shows the {microstats} instead of the infornation...

Bobby and others, the problem we are dealing with is the following:
Code:

$output = str_replace('{microstats}', $microstats_output, $output);
There is no $output processed by PhotoPost, in order to find {microstats} and replace it with the $microstats_output.
Since I don't have PhotoPost, the best way is to ask other PhotoPost coders how the output is processed.
All you have to do is add there the replacement line listed above, adapted to their code...

NeRilkA 06-05-2006 07:53 PM

yes it works ! thanks a lot !

TECK 06-05-2006 08:12 PM

Excellent, alors... clique sur le piton pour montrer aux gens que tu utilise ce mod. :)

CP, 06-06-2006 12:41 AM

Quote:

Originally Posted by CP,
Hi its ive installed it without any errors or anything but for me nothing is showing, ive enabled it also :(

Id be greatfull if somebody can help me with my query..., the hack installed without any errors or anything..., but i dont see anything...., no footer page stats or anything, not even topic stats on the category bar as show... :confused:

Tulsa 06-06-2006 01:32 AM

vbulletin options > bbmicrostats > Enable the vBMicroStats plugin > yes


Now I do believe we have a typo in the vbulletin options title. ;)


All times are GMT. The time now is 12:09 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01480 seconds
  • Memory Usage 1,844KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (8)bbcode_code_printable
  • (17)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete