Manual:Mctest.php

Category:MediaWiki code#Mctest.php

Details

mctest.php is a MediaWiki maintenance script that makes several 'set', 'incr', 'get' requests on every memcached server and shows a report.

Options/Arguments

Option Description Required Default value
--iNumber of iterationsOptional100
--cacheUse servers from this $wgObjectCaches storeOptional
--driverEither "php" or "pecl"Optionalphp
--server[:port]Memcached server to test, with optional portOptional

Usage

php maintenance/run.php mctest [ --i| --cache| --driver| --server[:port] ]
In MediaWiki version 1.39.12 and earlier, you must invoke maintenance scripts using php maintenance/scriptName.php instead of php maintenance/run.php scriptName.

Basic test

Terminal

Test with custom iterations

Terminal

Test with custom server and port

Terminal

Common error

MediaWiki isn't configured for Memcached usage
This error occurs when your MediaWiki installation is not configured properly with memcached server.
MediaWiki isn't configured with a cache named '$cache'
This indicates that you have not configured the '$cache' properly in $wgObjectCaches. Check LocalSettings.php for configuration details.

See also

Category:Maintenance scripts#mctest.php Category:Development maintenance scripts
Category:Development maintenance scripts Category:Maintenance scripts Category:MediaWiki code