Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Paste
P4569
CentralNotice monitoring script
Active
Public
Actions
Authored by
Ejegg
on Dec 5 2016, 7:02 PM.
Edit Paste
Archive Paste
View Raw File
Subscribe
Mute Notifications
Tags
MediaWiki-extensions-CentralNotice
Referenced Files
F4984086: CentralNotice monitoring script
Dec 5 2016, 7:02 PM
2016-12-05 19:02:06 (UTC+0)
Subscribers
None
#!/bin/bash
export
DISPLAY
=
:0
# needed for phantomjs
fname
=
`
date -u +%Y%m%d%H%M
`
for
lang in cs de en es
# cs and es were unaffected, de and en were affected
do
mkdir -p ~/cndebug/
$lang
/choiceData/
mkdir -p ~/cndebug/
$lang
/modvers/
mkdir -p ~/cndebug/
$lang
/phantom/
curl
"https://
$lang
.wikipedia.org/w/load.php?modules=ext.centralNotice.choiceData"
> ~/cndebug/
$lang
/choiceData/
$fname
curl
"https://
$lang
.wikipedia.org/w/load.php?debug=false&lang=en&modules=startup&only=scripts&skin=vector"
|
tr -d
'\n'
|
egrep -o
'loader.register.*?;;'
|
sed -e
's/loader.register.//'
-e
's/.;;//'
|
jq
'.[][0:2]|@csv'
> ~/cndebug/
$lang
/modvers/
$fname
phantomjs --local-storage-path
=
/tmp/ --load-images
=
false
~/src/js/phantomjs/loadWikiPage.js
$lang
> ~/cndebug/
$lang
/phantom/
$fname
done
# in crontab, I run it with
# */5 * * * * /home/elliott/bin/checkCN.sh
Event Timeline
Ejegg
created this paste.
Dec 5 2016, 7:02 PM
2016-12-05 19:02:06 (UTC+0)
Ejegg
mentioned this in
T152122: Central Notice: possible CN issue early on December 1st UTC
.
Dec 5 2016, 8:25 PM
2016-12-05 20:25:41 (UTC+0)
Log In to Comment