vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   vbMicroStats: page load time, queries, GZIP and PHP version (https://vborg.vbsupport.ru/showthread.php?t=35811)

Gary King 06-30-2002 04:02 PM

For a quick solution to this problem while I find a way to make microstats work, I have simply replaced the *edited* db_mysql.php with the *original* one, and the board seems to work now. [Although the stats at the bottom of the page are mostly incorrect, of course].

TECK 06-30-2002 04:32 PM

can you post here what they look like the stats?
i will help you with your prob. thanks.

i also need to know what php version you run (important).

Gary King 06-30-2002 11:39 PM

Quote:

Originally posted by Nakkid
can you post here what they look like the stats?
i will help you with your prob. thanks.

i also need to know what php version you run (important).

What do you mean by what the stats looks like? Do you mean how it looks like when browsing the board? Or the code? :confused:

Also, I am running PHP version 4.2.1

Thx for helping :cool:

Gary King 07-01-2002 03:18 AM

Quote:

Originally posted by Nakkid
"Page generated in 0.55087197 seconds (29.08% PHP - 70.92% MySQL) with 17 queries."
your problem is related to db_mysql.php, so i presume the only prob you have is the 100%-0% showing. am i correct?

Yep, that is what's expected, and that's what I get .. which of course is highly inaccurate :ermm:

Any solution nakkid ?? :)

TECK 07-01-2002 03:19 AM

attach in a pm your original db_mysql.php file, i will modify it for you.

Gary King 07-01-2002 03:27 AM

Quote:

Originally posted by Nakkid
attach in a pm your original db_mysql.php file, i will modify it for you.
sent .. :D

Gary King 07-01-2002 03:38 AM

thx nakkid !! the edited files seem to have fixed it :D

TECK 07-01-2002 04:37 AM

glad you got it working... :)

Gary King 07-01-2002 03:19 PM

Quote:

Originally posted by Nakkid
glad you got it working... :)
And oh btw, just sent ya a PM - my cable dropped last night while I attempted to send, so I just closed it :p

Kars10 07-02-2002 09:21 AM

Hello Nakkid!!
In my /forum/global.php i can?t find the segment in the first step to change.
Heres my code, please check it out. ;)

Gary King 07-02-2002 01:39 PM

@Minifreunde: Have you ever edited the file for another hack? What version of vB are you using? etc etc.. :p

Kars10 07-02-2002 03:28 PM

@ Blak n Wite, version is 2.2.5. Have so many hacks, but ive looked on the orginal global.php and it looks the same to me. Can“t find the lines to edit.... can i use this global-version with a modification?? Or some idea??

Kars10 07-02-2002 05:51 PM

@ all! I?m stupid! It was my falt. Problem fixed, works perfect!!
Thanks Nakkid!!!

P.S. I click installed! ;)

TECK 07-02-2002 07:04 PM

Quote:

Originally posted by Minifreunde
Hello Nakkid!!
In my /forum/global.php i can?t find the segment in the first step to change.
Heres my code, please check it out. ;)

Minifreunde, please remove that code, you infringe the vB regulations about publishing the code... thanks.
link:
https://vborg.vbsupport.ru/showthrea...233#post268233

Kars10 07-02-2002 07:49 PM

@Nakkid, stupid from me! Sorry, code is delete! ;)

Gary King 07-02-2002 09:19 PM

Quote:

Originally posted by Minifreunde
@ all! I?m stupid! It was my falt. Problem fixed, works perfect!!
Thanks Nakkid!!!

P.S. I click installed! ;)

Glad you worked it out :)

Kars10 07-03-2002 07:10 AM

@ B n W, thanx!! :)

Wildthinks 07-04-2002 07:30 AM

http://www.2watch4.net/fehler.jpg Hi nakkid, awesome hack .. i like and i need it to optimize my queries... but problems :tired:
- alway server load = 00.00, i have the options *nix=0, but i set the option >0 then i get the follow message:
Screenshot error
it's reqiered that i have access to loadavg ?

- second point is, that my debug always off. i have turned on the option, that templatenames include in the page... that's the debug option isn't?

THX :cheeky:

TECK 07-04-2002 04:41 PM

Wildthinks:
1. contact your host for server issues. also let me know if you see the stats in the admin panel.

2. no. run a file with ?debug=1

trilOByte 07-04-2002 07:27 PM

Thanks for this hack nakkid. I installed it yesterday and it worked perfectly, however, today I installe the xmenu hack (adding a java menu to the header) and now microstats reads....

Quote:

Page generated in 1,025,814,268.73077905 seconds (100.00% PHP - 0.00% MySQL) with 37 queries.
[Debug Mode OFF] [PHP v4.2.1] [GZIP enabled - level 1] [Server Load: 0.34 ? 0.48 : 0.46];

Any ideas?

TECK 07-04-2002 07:36 PM

check your db_mysql.php file. there is your prob.. the microtime.

trilOByte 07-04-2002 07:47 PM

OK, looking can't see the prob...

PHP Code:

  function query($query_string) {
    global 
$query_count,$showqueries,$explain,$querytime,$pagestarttime;
    
// do query

    
$pageendtime=microtime();
    
$starttime=explode(" ",$pagestarttime);
    
$endtime=explode(" ",$pageendtime);

    
$beforetime=$endtime[0]-$starttime[0]+$endtime[1]-$starttime[1];

    
$this->query_id mysql_query($query_string,$this->link_id);
    if (!
$this->query_id) {
      
$this->halt("Invalid SQL: ".$query_string);
    }

    
$query_count++;

    
$pageendtime=microtime();
    
$starttime=explode(" ",$pagestarttime);
    
$endtime=explode(" ",$pageendtime);

    
$aftertime=$endtime[0]-$starttime[0]+$endtime[1]-$starttime[1];
    
$querytime+=$aftertime-$beforetime;

    if (
$showqueries) {
      echo 
"Query: $query_string\n";
      echo 
"Time before: $beforetime\n";
      echo 
"Time after:  $aftertime\n" 

???

What's the prob?

trilOByte 07-04-2002 09:33 PM

Fixed...

Quote:

Page generated in 0.25673795 seconds (73.55% PHP - 26.45% MySQL) with 36 queries.
User error as usual ;)

I hacked the wrong global.php file. Doof! :D

Thanks.

Gary King 07-04-2002 10:00 PM

Quote:

Originally posted by trilOByte
Fixed...



User error as usual ;)

I hacked the wrong global.php file. Doof! :D

Thanks.

Common mistake :)

Glad you got it working :D

TECK 07-06-2002 03:09 AM

Quote:

Originally posted by trilOByte
I hacked the wrong global.php file. Doof! :D
Thanks.

is it to high 36 queries? i think it is. is there a way you reduce them? like around 20-25 should be a good number.

Kars10 07-06-2002 07:44 AM

Hi Guys!!
How can i reduce my Querys?? Ive got on index 38-39....
Please help! ;)

trilOByte 07-06-2002 08:36 AM

Quote:

is it to high 36 queries? i think it is. is there a way you reduce them? like around 20-25 should be a good number.
That's with the vBportal leftcolumn running, when I switch it off, I get:

Quote:

Page generated in 0.20114601 seconds (65.73% PHP - 34.27% MySQL) with 21 queries.

Gary King 07-06-2002 01:23 PM

I just tried and got this:

Code:

This page was brought to you in 0.14173198 seconds (84.24% PHP & 15.76% MySQL), with 30 queries!

trilOByte 07-06-2002 02:40 PM

You mean you turned your portal leftcolumn off, and still get 30 queries on your forum/index.php?

Gary King 07-06-2002 02:57 PM

Quote:

Originally posted by trilOByte
You mean you turned your portal leftcolumn off, and still get 30 queries on your forum/index.php?
I don't have a portal for my vB. I just went to my index.php again, and got the following:

Code:

This page was brought to you in 0.14055097 seconds (84.13% PHP & 15.87% MySQL), with 30 queries!
:ermm:

TECK 07-06-2002 05:18 PM

a standard forumhome index.php page gets 17queries. that means you have inserted certain hack code that added 12 extra queries. that will affect your board performance and also it will flame down your server if you have a busy board.
i know that the new vb3 will have 12queries on forumhome. less queries you have, better it is.

the easiest way is to eliminate the double queries you might have. for example if you have a query in global.php that checks the new pm's is useless to add that query also in index.php since you perform it globaly.

check for guides like that and try to reduce it to a decent number. i personally think from talking to firefly that a decent number of queries should be 25. i will keep on my board the no. of queries under 20 always.

-Sidekick- 07-06-2002 09:42 PM

I'm receiving extremely high numbers for the time the page loads. Stuff like 1,025,995,166.26833999 seconds. Though everything else works correctly. Any suggestions?

TECK 07-06-2002 10:40 PM

check your hacked code. you edited the wrong global.php file.

-Sidekick- 07-08-2002 06:59 AM

I followed the instructions. :confused:

trilOByte 07-08-2002 10:46 AM

I had this error, like Nakkid says, you hacked the wrong global.php file. There are two of them in different directories, you either hacked the wrong one, or uploaded to the wrong directory or something like that.

Check it out.

Spekkie 07-08-2002 02:04 PM

Nice Hack Dude!

TECK 07-10-2002 05:14 AM

Spekkie, thanks.
-Sidekick-, did you get it working?

Schorsch 07-15-2002 02:54 AM

thanks for the hack :)

I got these values:

Code:

Site generated in 1.14954901 seconds (17.90% PHP - 82.10% MySQL) with 25 queries.
[Debug Mode OFF] [PHP v4.0.6] [GZIP enabled - level 1]

are that normal values ??

and why don't I see the server load ?

thanks,
Schorsch

TECK 07-15-2002 02:57 AM

they look good to me, the values. for details related to your server load, please read the first post of this thread and contact your host.
let me know if you solve it. :)

X-Fan 07-15-2002 04:27 PM

Just installed this, and now my vbPortals front page stops loading halfway through the last block on the left-hand side.

Help!!!

EDIT: Never mind, got it!


All times are GMT. The time now is 03:11 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.02036 seconds
  • Memory Usage 1,832KB
  • 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
  • (3)bbcode_code_printable
  • (1)bbcode_php_printable
  • (13)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (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