The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Microstats (only for admin) - load times, server loads, queries, uncached templates! Details »» | |||||||||||||||||||||||||||
Microstats (only for admin) - load times, server loads, queries, uncached templates!
Developer Last Online: May 2013
Version 1.0 - works for most servers
Updated 1.1 - optimized code Updated 1.2 - added names of uncached templates! Okay, the original was by TECK. This is NOT based on his code - it is based on vB3's native code. If TECK wants me to remove this, I will do so. This is just my version that I use for my private forums. Information shown: 1) Page loading times 2) Number of Queries 3) Server Loads 4) Number of Any Uncached Templates 5) Name of Uncached Templates (NEW!) By default only an Admin (usergroup 6) can see it. Feel free to modify this bit. It's very easy to install. Open includes/functions.php: Find: PHP Code:
Version 1.2 - more optimized but requires /proc on your server - try this, if server loads don't show up use Version 1.02 below PHP Code:
Version 1.02 - Use this if Version 1.1 doesn't work for you. PHP Code:
Done! As simple as that. No need to enable debug mode. If you want only yourself to have this information, change: if ($bbuserinfo[usergroupid]==6) { to if ($bbuserinfo[userid]==1) { And replace 1 with your userid. To let everyone see it, remove that line, and the last } of the code above. Below is a screenshot of how my forumhome microstats look. EDIT: Thanks to kmike, I optimized the code. This should lessen the load when checking the server loads slightly. Version 1.2 and 1.02 now has added code to show NAMES OF UNCACHED TEMPLATES! Show Your Support
|
Comments |
#132
|
|||
|
|||
d3nnis:
Do you have access to server's shell? If so, what's output of "ls -l /proc/loadavg" and "ls -ld /proc" ? Anyway, you might want to revert to previous version of the hack for the time being... |
#133
|
|||
|
|||
/me clicks install. Thanks Erwin.
|
#134
|
|||
|
|||
Quote:
the server is owned by me. I will check it out tonite when i am back home. |
#135
|
|||
|
|||
Quote:
that will be great! by the way what kind of problem does uncached templates gives? increase server load? |
#136
|
|||
|
|||
Quote:
To find out what templates are uncached, one have to run the script in debug mode. Of course tt could be done simply by putting $debug=1; at the beginning of the script, but you don't want to scare your users, do you? So you can install one of the following hacks to restrict debug mode to certain users/groups/IPs: https://vborg.vbsupport.ru/showthread.php?t=59605 https://vborg.vbsupport.ru/showthread.php?t=61242 After installation, you'll have a table of template usage at the bottom of debugged page, with uncached templates highlighted. To cache template simply edit debugged script and add template name to globaltemplates array which is usually defined at the very top of the script. |
#137
|
|||
|
|||
Quote:
here's my output root@xxx [~]# ls -l /proc/loadavg -r--r--r-- 1 root root 0 Apr 22 20:20 /proc/loadavg root@xxx [~]# ls -ld /proc dr-xr-xr-x 286 root root 0 Apr 22 07:06 /proc/ |
#138
|
|||
|
|||
Quote:
i written my TOS page , http://forums.keeptouch.net/tos.php using this code : Code:
<?php $globaltemplates = array( 'navbar', 'tos' ); require_once('./global.php'); eval('$navbar = "' . fetch_template('navbar') . '";'); eval('print_output("' . fetch_template('tos') . '");'); ?> Code:
$globaltemplates = array( 'navbar', 'tos' ); |
#139
|
|||
|
|||
Quote:
What is output of this script: PHP Code:
|
#140
|
|||
|
|||
Quote:
nope, safe mode definitely not on my output of this script is file_get_contents: 1 safe_mode: |
#141
|
|||
|
|||
Very weird.
Ok, what does "cat /proc/loadavg" show when run in the command line? And since we're so deep in testing, what's output of this php script: PHP Code:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|