http://www.mediawiki.org/wiki/Special:Code/MediaWiki/56375
Revision: 56375
Author: brion
Date: 2009-09-15 17:46:30 +0000 (Tue, 15 Sep 2009)
Log Message:
-----------
Merge some changes & custom scripts back from old wmf-deployment branch:
r53265
r53317
r53318
r53855
Modified Paths:
--------------
branches/wmf-deployment-work/includes/DefaultSettings.php
Added Paths:
-----------
branches/wmf-deployment-work/StartProfiler.php
branches/wmf-deployment-work/maintenance/jobs-loop.sh
branches/wmf-deployment-work/maintenance/storage/make-all-blobs
branches/wmf-deployment-work/maintenance/storage/recompressTracked.sh
branches/wmf-deployment-work/maintenance/storage/testRctComplete.php
branches/wmf-deployment-work/math/GNUmakefile
Copied: branches/wmf-deployment-work/StartProfiler.php (from rev 56374,
branches/wmf-deployment/StartProfiler.php)
===================================================================
--- branches/wmf-deployment-work/StartProfiler.php
(rev 0)
+++ branches/wmf-deployment-work/StartProfiler.php 2009-09-15 17:46:30 UTC
(rev 56375)
@@ -0,0 +1,51 @@
+<?php
+# WARNING: This file is publically viewable on the web. Do not put private
data here.
+#
+$rand = mt_rand(0, 0x7fffffff);
+$host = @$_SERVER['HTTP_HOST'];
+
+/*if ( ( !($rand % 50) && $host == 'en.wikipedia.org' ) ||
+ ( !($rand % 50) && $host == 'commons.wikimedia.org') ||
+ ( !($rand % 50) && $host == 'de.wikipedia.org') ||
+ ( !($rand % 50) && $host == 'es.wikipedia.org') ||
+ ( !($rand % 1) && $host == 'test.wikipedia.org' ) ||
+ ( $host == 'zh.wikipedia.org' ) ||
+ ( !($rand % 10) && $host == 'ja.wikipedia.org' )
+) {*/
+if ( @$_SERVER['REQUEST_URI'] ==
'/w/index.php?title=United_States&action=submit' ) {
+ require_once( dirname(__FILE__).'/includes/ProfilerSimpleUDP.php' );
+ $wgProfiler = new ProfilerSimpleUDP;
+ $wgProfiler->setProfileID( 'bigpage' );
+} elseif (@defined($_REQUEST['forceprofile'])) {
+ require_once( dirname(__FILE__).'/includes/ProfilerSimpleText.php' );
+ $wgProfiler = new ProfilerSimpleText;
+ $wgProfiler->setProfileID( 'forced' );
+} elseif (@defined($_REQUEST['forcetrace'])) {
+ require_once( dirname(__FILE__).'/includes/ProfilerSimpleTrace.php' );
+ $wgProfiler = new ProfilerSimpleTrace;
+} elseif ( strpos( @$_SERVER['REQUEST_URI'], '/w/thumb.php' ) !== false ) {
+ require_once( dirname(__FILE__).'/includes/ProfilerSimpleUDP.php' );
+ $wgProfiler = new ProfilerSimpleUDP;
+ $wgProfiler->setProfileID( 'thumb' );
+} elseif ( !( $rand % 50 ) ) {
+ require_once( dirname(__FILE__).'/includes/ProfilerSimpleUDP.php' );
+ $wgProfiler = new ProfilerSimpleUDP;
+ if ( $host == 'en.wikipedia.org' ) {
+ $wgProfiler->setProfileID( 'enwiki' );
+ } elseif ( $host == 'de.wikipedia.org' ) {
+ $wgProfiler->setProfileID( 'dewiki' );
+ } else {
+ $wgProfiler->setProfileID( 'others' );
+ }
+ #$wgProfiler->setProfileID( 'all' );
+ #$wgProfiler->setMinimum(5 /* seconds */);
+}
+elseif ( defined( 'MW_FORCE_PROFILE' ) ) {
+ require_once( dirname(__FILE__).'/includes/Profiler.php' );
+ $wgProfiler = new Profiler;
+} else {
+ require_once( dirname(__FILE__).'/includes/ProfilerStub.php' );
+}
+
+
+
Property changes on: branches/wmf-deployment-work/StartProfiler.php
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/REL1_15/phase3/StartProfiler.php:51646
/trunk/phase3/StartProfiler.php:52290,52402,52404,52718,52737,52759,52776,52791,52800,52808,52812-52813,52815-52819,52822,52846,52850,52852-52853,52855-52857,52859,52924,52986,53128-53129,53190,53197,53199,53203-53204,53210-53211,53247,53249,53252,53267,53270,53293,53305,53344,53369,53427,53502-53504,53506,53777,54384,54494,54592,54599-54602,54604,54613,54764,54793,54806,55178,55626
Added: svn:eol-style
+ native
Modified: branches/wmf-deployment-work/includes/DefaultSettings.php
===================================================================
--- branches/wmf-deployment-work/includes/DefaultSettings.php 2009-09-15
17:25:47 UTC (rev 56374)
+++ branches/wmf-deployment-work/includes/DefaultSettings.php 2009-09-15
17:46:30 UTC (rev 56375)
@@ -33,7 +33,7 @@
}
/** MediaWiki version number */
-$wgVersion = '1.16alpha';
+$wgVersion = '1.16alpha-wmf';
/** Name of the site. It must be changed in LocalSettings.php */
$wgSitename = 'MediaWiki';
Copied: branches/wmf-deployment-work/maintenance/jobs-loop.sh (from rev 56374,
branches/wmf-deployment/maintenance/jobs-loop.sh)
===================================================================
--- branches/wmf-deployment-work/maintenance/jobs-loop.sh
(rev 0)
+++ branches/wmf-deployment-work/maintenance/jobs-loop.sh 2009-09-15
17:46:30 UTC (rev 56375)
@@ -0,0 +1,33 @@
+#!/bin/bash
+
+trap 'kill %-; exit' SIGTERM
+[ ! -z "$1" ] && {
+ echo "starting type-specific job runner: $1"
+ type=$1
+}
+
+cd `readlink -f /home/wikipedia/common/php/maintenance`
+while [ 1 ];do
+ db=
+ while [ -z $db ];do
+ if [ ! -z "$type" ]; then
+ db=`php -n nextJobDB.php --type=$type`
+ else
+ db=`php -n nextJobDB.php`
+ fi
+
+ if [ -z $db ];then
+ # No jobs to do, wait for a while
+ echo "No jobs..."
+ sleep 5
+ fi
+ done
+ echo $db
+ if [ ! -z "$type" ]; then
+ nice -n 20 php runJobs.php $db --procs=4 $type &
+ else
+ nice -n 20 php runJobs.php $db --procs=4 &
+ fi
+ wait
+done
+
Property changes on: branches/wmf-deployment-work/maintenance/jobs-loop.sh
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mergeinfo
+ /branches/REL1_15/phase3/maintenance/jobs-loop.sh:51646
/trunk/phase3/maintenance/jobs-loop.sh:52290,52402,52404,52718,52737,52759,52776,52791,52800,52808,52812-52813,52815-52819,52822,52846,52850,52852-52853,52855-52857,52859,52924,52986,53128-53129,53190,53197,53199,53203-53204,53210-53211,53247,53249,53252,53267,53270,53293,53305,53344,53369,53427,53502-53504,53506,53777,54384,54494,54592,54599-54602,54604,54613,54764,54793,54806,55178,55626
Added: svn:eol-style
+ native
Copied: branches/wmf-deployment-work/maintenance/storage/make-all-blobs (from
rev 56374, branches/wmf-deployment/maintenance/storage/make-all-blobs)
===================================================================
--- branches/wmf-deployment-work/maintenance/storage/make-all-blobs
(rev 0)
+++ branches/wmf-deployment-work/maintenance/storage/make-all-blobs
2009-09-15 17:46:30 UTC (rev 56375)
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+if [ -z $1 ];then
+ echo "Usage: make-all-blobs <server> [<table name>]"
+ exit 1
+fi
+server=$1
+if [ -z $2 ]; then
+ table=blobs
+else
+ table=$2
+fi
+
+for db in `</home/wikipedia/common/all.dblist`;do
+ echo "CREATE DATABASE IF NOT EXISTS $db" | mysql -u wikiadmin
-p`wikiadmin_pass` -h $server && \
+ sed "s/blobs\>/$table/" blobs.sql | mysql -u wikiadmin
-p`wikiadmin_pass` -h $server $db
+done
+
Property changes on:
branches/wmf-deployment-work/maintenance/storage/make-all-blobs
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mergeinfo
+ /branches/REL1_15/phase3/maintenance/storage/make-all-blobs:51646
/trunk/phase3/maintenance/storage/make-all-blobs:52290,52402,52404,52718,52737,52759,52776,52791,52800,52808,52812-52813,52815-52819,52822,52846,52850,52852-52853,52855-52857,52859,52924,52986,53128-53129,53190,53197,53199,53203-53204,53210-53211,53247,53249,53252,53267,53270,53293,53305,53344,53369,53427,53502-53504,53506,53777,54384,54494,54592,54599-54602,54604,54613,54764,54793,54806,55178,55626
Copied: branches/wmf-deployment-work/maintenance/storage/recompressTracked.sh
(from rev 56374,
branches/wmf-deployment/maintenance/storage/recompressTracked.sh)
===================================================================
--- branches/wmf-deployment-work/maintenance/storage/recompressTracked.sh
(rev 0)
+++ branches/wmf-deployment-work/maintenance/storage/recompressTracked.sh
2009-09-15 17:46:30 UTC (rev 56375)
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+for db in `</home/wikipedia/common/all.dblist`;do
+ echo "
+-------------------------------------
+$db
+-------------------------------------
+" | tee -a /home/wikipedia/logs/norotate/rct/stdout.log
+ if [ "$db" == enwiki ]; then
+ procs=5
+ else
+ procs=5
+ fi
+ php recompressTracked.php --wiki=$db --procs=$procs
--info-log=/home/wikipedia/logs/norotate/rct/info.log
--critical-log=/home/wikipedia/logs/norotate/rct/critical.log rc1 2>&1 | tee -a
/home/wikipedia/logs/norotate/rct/stdout.log
+done
Property changes on:
branches/wmf-deployment-work/maintenance/storage/recompressTracked.sh
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mergeinfo
+ /branches/REL1_15/phase3/maintenance/storage/recompressTracked.sh:51646
/trunk/phase3/maintenance/storage/recompressTracked.sh:52290,52402,52404,52718,52737,52759,52776,52791,52800,52808,52812-52813,52815-52819,52822,52846,52850,52852-52853,52855-52857,52859,52924,52986,53128-53129,53190,53197,53199,53203-53204,53210-53211,53247,53249,53252,53267,53270,53293,53305,53344,53369,53427,53502-53504,53506,53777,54384,54494,54592,54599-54602,54604,54613,54764,54793,54806,55178,55626
Added: svn:eol-style
+ native
Copied: branches/wmf-deployment-work/maintenance/storage/testRctComplete.php
(from rev 56374,
branches/wmf-deployment/maintenance/storage/testRctComplete.php)
===================================================================
--- branches/wmf-deployment-work/maintenance/storage/testRctComplete.php
(rev 0)
+++ branches/wmf-deployment-work/maintenance/storage/testRctComplete.php
2009-09-15 17:46:30 UTC (rev 56375)
@@ -0,0 +1,22 @@
+<?php
+require_once( dirname(__FILE__).'/../commandLine.inc' );
+
+$bad = 0;
+$good = 0;
+foreach ( $wgLocalDatabases as $wiki ) {
+ $lb = wfGetLB( $wiki );
+ $db = $lb->getConnection( DB_SLAVE, array(), $wiki );
+ if ( $db->tableExists( 'blob_tracking' ) ) {
+ $notDone = $db->selectField( 'blob_tracking', '1',
+ array( 'bt_moved' => 0 ) );
+ if ( $notDone ) {
+ $bad++;
+ echo "$wiki\n";
+ } else {
+ $good++;
+ }
+ }
+ $lb->reuseConnection( $db );
+}
+echo "$bad wiki(s) incomplete\n";
+echo "$good wiki(s) complete\n";
Property changes on:
branches/wmf-deployment-work/maintenance/storage/testRctComplete.php
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/REL1_15/phase3/maintenance/storage/testRctComplete.php:51646
/trunk/phase3/maintenance/storage/testRctComplete.php:52290,52402,52404,52718,52737,52759,52776,52791,52800,52808,52812-52813,52815-52819,52822,52846,52850,52852-52853,52855-52857,52859,52924,52986,53128-53129,53190,53197,53199,53203-53204,53210-53211,53247,53249,53252,53267,53270,53293,53305,53344,53369,53427,53502-53504,53506,53777,54384,54494,54592,54599-54602,54604,54613,54764,54793,54806,55178,55626
Added: svn:eol-style
+ native
Copied: branches/wmf-deployment-work/math/GNUmakefile (from rev 56374,
branches/wmf-deployment/math/GNUmakefile)
===================================================================
--- branches/wmf-deployment-work/math/GNUmakefile
(rev 0)
+++ branches/wmf-deployment-work/math/GNUmakefile 2009-09-15 17:46:30 UTC
(rev 56375)
@@ -0,0 +1,2 @@
+all:
+ @echo "Do not run make on the NFS copy, use scap to rebuild it
everywhere"
Property changes on: branches/wmf-deployment-work/math/GNUmakefile
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/REL1_15/phase3/math/GNUmakefile:51646
/trunk/phase3/math/GNUmakefile:52290,52402,52404,52718,52737,52759,52776,52791,52800,52808,52812-52813,52815-52819,52822,52846,52850,52852-52853,52855-52857,52859,52924,52986,53128-53129,53190,53197,53199,53203-53204,53210-53211,53247,53249,53252,53267,53270,53293,53305,53344,53369,53427,53502-53504,53506,53777,54384,54494,54592,54599-54602,54604,54613,54764,54793,54806,55178,55626
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs