![]() |
doesn't work... still get the redeclare error.
Fatal error: Cannot redeclare serveruptime() in /home/www/html/forum/admin/functions.php on line 518 |
worked perfect first time using vb 2.2.9 :)
Page generated in 0.33490300 seconds (43.71% PHP - 56.29% MySQL) with 21 queries. [Debug Mode OFF] [PHP v4.2.3] [GZIP enabled - level 1] [Server Load: 1.05 ? 1.10 : 1.08] is it possible for the admin only stuff to be view by anyone ? |
Quote:
Code:
function uptime() { |
Teck, how would we get the serveruptime to show in the admin part of microstats at the bottom of the page? :)
|
Boofo, find:
Code:
if ($stats=@exec('uptime')) { Code:
if ( $stats = @exec( 'uptime' ) ) { |
Thanks, Floren, :) When I added the code you gave me, my Server Load has no numbers after it now. It only shows : :. Any ideas? :) And how can I get it to show on the next line?
|
yeah TECK, it works but then doesn't show the server load averages, just : :
|
That's really wierd.. I simply added a function, so it should display it...
Code:
function getserveruptime() { Boofo, simply call $serveruptime anywhere you want... you could use this: '][high]<br />[/high][Server UpTime: ' . $serveruptime . ']'; from the line listed above, it will display it under the actual line of admin stats... let me know if everything is ok... simply add the above function below this line: Code:
preg_match('/averages?: ([0-9\.]+),[\s]+([0-9\.]+),[\s]+([0-9\.]+)/',$stats,$regs); |
Thank you, Floren. It worked great! Once again you have proven yourself the Microstats Wizard. ;) This is why it won Hack of the Month. If they ever have a hack of the year contest, you got my vote! ;)
One last question (2 actually). What is the difference between Server Uptime and MySQL uptime? I have both of them installed and they are about 5 days off from one another. Also, could you show me how to add (I know this will sound stupid) seconds to the uptime, please? :) |
1. There is a link I posted in the first thread that will explain the diff between, is done by Eva2000 at VB.com site.
2. For seconds, use this: Code:
$sec = floor( $sys_ticks - ( $days * 60 * 24 ) - ( $hours * 60 ) - ( $min * 60 ) ); Code:
if ( $sec != 1 ) { |
All times are GMT. The time now is 11:14 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|