From: Brion Vibber Date: Tue, 15 Sep 2009 00:24:24 +0000 (+0000) Subject: De-Wikimedified lag.php script and merged to trunk. Still not 100% sure what the... X-Git-Tag: 1.31.0-rc.0~39725 X-Git-Url: https://git.cyclocoop.org/%242?a=commitdiff_plain;h=c78d9d37f89af8cba24e8ca95deccae38d20f60b;p=lhc%2Fweb%2Fwiklou.git De-Wikimedified lag.php script and merged to trunk. Still not 100% sure what the -r option is supposed to do, but it now runs. :) --- diff --git a/maintenance/lag.php b/maintenance/lag.php new file mode 100644 index 0000000000..6d0e76ee1d --- /dev/null +++ b/maintenance/lag.php @@ -0,0 +1,33 @@ +getServerCount(); $i++ ) { + $hostname = $lb->getServerName( $i ); + printf("%-12s ", $hostname ); + } + print("\n"); + + while( 1 ) { + $lags = $lb->getLagTimes(); + unset( $lags[0] ); + print( gmdate( 'H:i:s' ) . ' ' ); + foreach( $lags as $i => $lag ) { + printf("%-12s " , $lag === false ? 'false' : $lag ); + } + print("\n"); + sleep(5); + } +} else { + $lb = wfGetLB(); + $lags = $lb->getLagTimes(); + foreach( $lags as $i => $lag ) { + $name = $lb->getServerName( $i ); + printf("%-20s %s\n" , $name, $lag === false ? 'false' : $lag ); + } +} +?>