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 |
#142
|
|||
|
|||
Quote:
i got a open_basedir restriction error. i cannot test cat /proc/loadavg via the command line cos i am not at home. anymore command line commands to test? i do one shot upon reaching home. |
#143
|
|||
|
|||
Ok, we're getting somewhere.
If you want to use latest version of the hack, you'll have to add "/proc" to the list of open_basedir restricted directories. It's done through editing your httpd.conf, or php.ini, or through .htaccess (not sure about last one though). Or, if you want to save the hassle, just roll back to previous version of hack. |
#144
|
|||
|
|||
Quote:
thanks, i enable my domain, keeptouch.net and forums.keeptouch.net to allow open_basedir restriction via whm. i can see the server loads now |
#145
|
|||
|
|||
kmike, i just migrated to a new server running on freeBSD 4.9... the new codes (server loads not showing again) doesn't works anymore... any resolution?
root# ls -ld /proc dr-xr-xr-x 1 root wheel 512 May 2 04:45 /proc root# ls -l /proc/loadavg ls: /proc/loadavg: No such file or directory seems like i need this loadavg... where can i get it? |
#146
|
|||
|
|||
Nice hack!
I've got my footer setup with an inside table with a dark border surrounding the content table. Is there a way that I could move the microstats up so it under the vb copyright line? http://www.skinnylizard.com/verge |
#147
|
|||
|
|||
Nevermind, I figured it out...
I made it a link in my footer that goes to javascript:void(0); and the mouse over lists the page stats... I'll share the code modifications if anyone is interested. |
#148
|
||||
|
||||
Quote:
|
#149
|
|||
|
|||
In my footer template, I have a link that shows the forum time. You need to find a comon element that's in your footer and nowhere else in you site or this will cause problems.
Code:
<a style="text-decoration:none" title="All times are GMT$timediff. The time now is $timenow" href="javascript:void(0);"><b>Forum Time</b></a> Code:
$vartext = str_replace('<b>Forum Time</b></a>', "<b>Forum Time</b></a> | <a style=\"text-decoration:none\" title=\"$debughtml\" href=\"javascript:void(0);\"><b>Page Stats</b></a><br>",$vartext); Code:
$debughtml = "Page generated in $totaltime seconds with $query_count queries"; |
#150
|
|||
|
|||
d3nnis: freebsd doesn't have /proc/loadavg, you'll have to resort to the previous version of this hack which invokes "loadavg" command.
|
#151
|
|||
|
|||
Quote:
ohh okie... ermm i dun have the codes anymore... anyone has it? |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|