From: Brion Vibber Date: Tue, 5 Dec 2006 02:37:31 +0000 (+0000) Subject: * silly script to dump lag time for each database X-Git-Tag: 1.31.0-rc.0~54986 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/pie.php?a=commitdiff_plain;h=02826c094ea22d36a4eba5b77e4c371b4c329c5b;p=lhc%2Fweb%2Fwiklou.git * silly script to dump lag time for each database --- diff --git a/maintenance/getLagTimes.php b/maintenance/getLagTimes.php new file mode 100644 index 0000000000..827bc49e1f --- /dev/null +++ b/maintenance/getLagTimes.php @@ -0,0 +1,22 @@ +getLagTimes(); + foreach( $lags as $n => $lag ) { + $host = $wgDBservers[$n]["host"]; + if( IP::isValid( $host ) ) { + $ip = $host; + $host = gethostbyaddr( $host ); + } else { + $ip = gethostbyname( $host ); + } + printf( "%10s %20s %3d\n", $ip, $host, $lag ); + } +} + +?> \ No newline at end of file