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 |
#122
|
||||
|
||||
Quote:
I've updated the first post. People feel free to update to the code in the 1st post. It should lessen the load slightly. |
#123
|
|||
|
|||
Thanks for the update... appreciated that you keep us up to date with improvements
Nice tweak, and updated in no time |
#124
|
|||
|
|||
Quote:
yah i would like to learn too! |
#125
|
|||
|
|||
i followed this codes :
Code:
// Microstats hack if ($bbuserinfo[usergroupid]==6) { $pageendtime = microtime(); $starttime = explode(' ', $pagestarttime); $endtime = explode(' ', $pageendtime); $totaltime = vb_number_format($endtime[0] - $starttime[0] + $endtime[1] - $starttime[1], 5); $loadavg = @file_get_contents("/proc/loadavg"); if ($loadavg) { $regs = explode(" ",$loadavg); $serverload=' [Server Loads: <b>'.$regs[0].'</b> '.$regs[1].' : '.$regs[2].']'; } $debughtml = "<center><span class=\"smallfont\">Page generated in <b>$totaltime</b> seconds with <b>$query_count</b> queries" . iif($_TEMPLATEQUERIES, " (<b>" . sizeof($_TEMPLATEQUERIES) . "</b> queries for uncached templates)", '') . "$serverload</span></center>"; $vartext = str_replace('</body>', "$debughtml\n</body>", $vartext); } //Microstats Hack |
#126
|
||||
|
||||
Quote:
Originally Posted by iguanairs I have 2 uncached templates. I don't know how to cache a template. That is something I haven't done yet. I could use some guidance with this. yah i would like to learn too! Just bumping as there are now 2 of us trying to figure this out. How do we cache a page? |
#127
|
||||
|
||||
Bump
I know this is easy to do. Can I query it? I searched these forums and when you type in cache template,etc you get hundreds of listings,but not telling how! Please answer this. I know 90% of you know how to do it. |
#128
|
|||
|
|||
d3nnis:
Did server load show before? What's your server OS? |
#129
|
|||
|
|||
Quote:
using redhat 7.3 :nervous: |
#130
|
||||
|
||||
Hm! Very simple, and looks pertty good. I'll probaly use this....(Clicks Install)
|
#131
|
||||
|
||||
Quote:
I may add a feature to this hack so that uncached templates show up with names. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|