MediaWiki  master
mcc.php File Reference

memcached diagnostic tool More...

Go to the source code of this file.

Functions

 mccGetHelp ( $command)
 
 mccShowUsage ()
 Show this command line tool usage. More...
 

Variables

if( $line===false) $args = explode( ' ', $line )
 
 $cache = $options['cache'] ?? null
 
 $command = array_shift( $args )
 
 $debug = isset( $options['debug'] )
 
 $help = isset( $options['help'] )
 
 $line = Maintenance::readconsole()
 
if( $help) $mcc
 
 $optionsWithArgs = [ 'cache' ]
 
 $optionsWithoutArgs
 
 $quit = false
 
 $showhelp = false
 
 do
 
if( $cache) elseif( $wgMainCacheType===CACHE_MEMCACHED) elseif(isset( $wgObjectCaches[$wgMainCacheType]['servers'])) else
 

Detailed Description

memcached diagnostic tool

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. http://www.gnu.org/copyleft/gpl.html

Todo:
document

Definition in file mcc.php.

Function Documentation

◆ mccGetHelp()

mccGetHelp (   $command)

Definition at line 83 of file mcc.php.

References $command.

Referenced by mccShowUsage().

◆ mccShowUsage()

mccShowUsage ( )

Show this command line tool usage.

Definition at line 62 of file mcc.php.

References mccGetHelp(), and print.

Variable Documentation

◆ $args

if ($line===false) $args = explode( ' ', $line )

Definition at line 124 of file mcc.php.

Referenced by ParserDiffTest\__call(), StubObject\__call(), DumpBackup\__construct(), MediaTransformError\__construct(), TextPassDumper\__construct(), BackupDumper\__construct(), MemcachedClient\__construct(), PPTemplateFrame_Hash\__toString(), PPTemplateFrame_DOM\__toString(), StubObject\_call(), LogPage\actionText(), HTMLForm\addButton(), CachedAction\addCachedHTML(), SpecialCachedPage\addCachedHTML(), OutputPage\addWikiMsg(), OutputPage\addWikiMsgArray(), ArrayUtils\arrayDiffAssocRecursive(), Parser\braceSubstitution(), Preprocessor\cacheGetTree(), MemoizedCallable\call(), Xhprof\callAny(), Parser\callParserFunction(), MediaWiki\Auth\AuthManager\checkAccountCreatePermissions(), WikiPage\commitRollback(), Wikimedia\Rdbms\DatabaseSqlite\deadlockLoop(), Wikimedia\Rdbms\Database\deadlockLoop(), RecompressTracked\dispatch(), RecompressTracked\dispatchToChild(), RecompressTracked\doAllOrphans(), DeleteOldRevisions\doDelete(), Xhprof\enable(), Xml\encodeJsCall(), MediaWiki\Shell\Shell\escape(), ApiQueryAllMessages\execute(), FindHooks\execute(), CdbInspector\execute(), CommandLineInc\execute(), SpecialEditWatchlist\execute(), RecompressTracked\executeChild(), Wikimedia\Rdbms\LBFactory\forEachLBCallMethod(), Http\get(), CachedAction\getCachedValue(), SpecialCachedPage\getCachedValue(), CacheHelper\getCachedValue(), WebInstaller\getHelpBox(), FindHooks\getHooksFromFile(), FindHooks\getHooksFromLocalDoc(), FileRepo\getLocalCacheKey(), PPFuzzUser\getOption(), BagOStuff\getScopedLock(), ForeignDBViaLBRepo\getSharedCacheKey(), ForeignDBRepo\getSharedCacheKey(), LocalRepo\getSharedCacheKey(), PPFrame_Hash\implode(), PPFrame_DOM\implode(), PPFrame_Hash\implodeWithFlags(), PPFrame_DOM\implodeWithFlags(), Wikimedia\Rdbms\DatabasePostgres\insert(), MemoizedCallable\invokeArgs(), XmlDumpWriter\invokeLenient(), Maintenance\loadParamsAndArgs(), Maintenance\loadWithArgv(), MemcachedBagOStuff\makeKeyInternal(), WinCacheBagOStuff\makeKeyInternal(), CachedBagOStuff\makeKeyInternal(), MultiWriteBagOStuff\makeKeyInternal(), MediumSpecificBagOStuff\makeKeyInternal(), PPFrame_Hash\newChild(), PPFrame_DOM\newChild(), Preprocessor_Hash\newCustomFrame(), Preprocessor_DOM\newCustomFrame(), RecompressTracked\newFromCommandLine(), FileBackend\newStatus(), MediaWiki\Site\MediaWikiPageNameNormalizer\normalizePageName(), ComposerPhpunitXmlCoverageEdit\onEvent(), MediaWiki\Shell\Command\params(), Message\params(), TemplateParser\processTemplate(), SpecialUpload\processVerificationError(), JobQueueRedis\pushBlobs(), Sanitizer\removeHTMLtags(), ImportReporter\reportLogItem(), Hooks\run(), MysqlMaintenance\runMysql(), Hooks\runWithoutAbort(), MWHttpRequest\setData(), LogEventsList\showLogExtract(), SpecialUpload\showUploadWarning(), CoreParserFunctions\tagObj(), MediaWiki\Shell\Command\unsafeParams(), PPFrame_Hash\virtualBracketedImplode(), PPFrame_DOM\virtualBracketedImplode(), PPFrame_Hash\virtualImplode(), PPFrame_DOM\virtualImplode(), wfEscapeShellArg(), wfForeignMemcKey(), wfGlobalCacheKey(), wfMemcKey(), wfMergeErrorArrays(), wfMsgReplaceArgs(), OutputPage\wrapWikiMsg(), and DatabaseUpdater\writeSchemaUpdateFile().

◆ $cache

$cache = $options['cache'] ?? null

Definition at line 33 of file mcc.php.

Referenced by MediaWiki\BadFileLookup\__construct(), LinkCache\__construct(), Pingback\acquireLock(), LinkCache\addLinkObj(), LinkBatch\addResultToCache(), MediaWiki\Auth\AuthManager\autoCreateUser(), Preprocessor\cacheGetTree(), Preprocessor\cacheSetTree(), User\clearSharedCache(), ResourceLoaderFileModule\compileLessFile(), MediaWiki\Auth\AuthManager\continueAccountCreation(), LanguageConverter\convertNamespace(), MultiWriteBagOStuff\deleteObjectsExpiringBefore(), UsersPager\doBatchLookups(), MultiWriteBagOStuff\doWrite(), McTest\execute(), LinkBatch\executeInto(), FormatMetadata\fetchExtendedMetadata(), Message\fetchMessage(), ResourceLoader\filter(), MultiWriteBagOStuff\get(), MessageBlobStore\getBlobs(), Skin\getCachedNotice(), WikiMap\getCanonicalServerInfoForAllWikis(), ChangesListSpecialPage\getChangeTagListSummary(), WikiPage\getContentModel(), SpecialVersion\getCreditsForExtension(), ForeignDBFile\getDescriptionText(), File\getDescriptionText(), DifferenceEngine\getDiffBody(), DjVuHandler\getDimensionInfo(), IcuCollation\getFirstLetterData(), UsersPager\getGroupMemberships(), ApiHelp\getHelp(), ObjectCache\getLocalServerInstance(), TransformationalImageHandler\getMagickVersion(), Wikimedia\Rdbms\DatabaseMysqlBase\getMasterServerInfo(), FileCacheBase\getMissesRecent(), ContentHandler\getParserOutputForIndexing(), UIDGenerator\getSequentialPerNodeIDs(), Wikimedia\Rdbms\DatabaseMysqlBase\getServerVersion(), TemplateParser\getTemplate(), User\getTouched(), DependencyWrapper\getValueFromCache(), FileCacheBase\incrMissesRecent(), Parser\interwikiTransclude(), InfoAction\invalidateCache(), ResourceLoaderWikiModule\invalidateModuleCache(), LinkCache\invalidateTitle(), MediaWiki\Block\DatabaseBlock\isWhitelistedFromAutoblocks(), SiteStats\jobs(), ChangeTags\listExplicitlyDefinedTags(), ChangeTags\listSoftwareActivatedTags(), ChangeTags\listSoftwareDefinedTags(), LocalFile\loadFromCache(), User\loadFromCache(), AjaxResponse\loadFromMemcached(), ExtensionRegistry\loadFromQueue(), Title\loadRestrictions(), LanguageConverter\loadTables(), MediaWiki\main(), ObjectCache\newAnything(), ResourceFileCache\newFromContext(), SiteStats\numberingroup(), HistoryAction\onView(), InfoAction\pageCounts(), CoreParserFunctions\pagesincategory(), SiteStats\pagesInNs(), User\pingLimiter(), ResourceLoaderWikiModule\preloadTitleInfo(), User\purge(), WikiPage\purgeInterwikiCheckKey(), Article\purgePatrolFooterCache(), ChangeTags\purgeTagCacheAll(), MessageBlobStore\recacheMessageBlob(), ManageJobs\repushAbandoned(), MediaWiki\run(), ResourceLoaderModule\saveFileDependencies(), MultiWriteBagOStuff\setDebug(), MultiWriteBagOStuff\setMockTime(), Article\showPatrolFooter(), AjaxResponse\storeInMemcached(), DependencyWrapper\storeToCache(), ChangeTags\tagUsageStatistics(), User\touch(), WikiPage\triggerOpportunisticLinksUpdate(), Article\tryFileCache(), ResourceLoaderModule\validateScriptFile(), wfGenerateThumbnail(), wfIsDebugRawPage(), and MediaWiki\Session\PHPSessionHandler\write().

◆ $command

◆ $debug

$debug = isset( $options['debug'] )

Definition at line 31 of file mcc.php.

◆ $help

$help = isset( $options['help'] )

◆ $line

Definition at line 119 of file mcc.php.

Referenced by FormattedRCFeed\__construct(), UIDGenerator\__construct(), MemcachedClient\_incrdecr(), MemcachedClient\_set(), TableDiffFormatter\added(), TableDiffFormatter\addedLine(), Skin\addToSidebarPlain(), DatabaseUpdater\appendLine(), SpecialRevisionDelete\buildCheckBoxes(), Licenses\buildLine(), OrderedStreamingForkController\consume(), TableDiffFormatter\context(), TableDiffFormatter\contextLine(), DjVuImage\convertDumpToXML(), TableDiffFormatter\deleted(), TableDiffFormatter\deletedLine(), Wikimedia\StaticArrayWriter\encode(), Installer\envCheckShellLocale(), DeleteBatch\execute(), GenerateNormalizerDataAr\execute(), CreateCommonPasswordCdb\execute(), MwSql\execute(), MoveBatch\execute(), FetchText\execute(), CdbInspector\execute(), MediaWiki\Rest\EntryPoint\execute(), MediaWiki\Shell\Command\execute(), RecompressTracked\executeChild(), ArrayDiffFormatter\format(), GenerateCollationData\generateFirstChars(), ApiCSPReport\generateLogLine(), UploadBase\getFilenamePrefixBlacklist(), MWDebug\getHTMLDebugLog(), MWExceptionHandler\getLogMessage(), MWExceptionHandler\getLogNormalMessage(), FormatMetadata\getVisibleFields(), Parser\handleAllQuotes(), MWExceptionHandler\handleError(), MWExceptionHandler\handleFatalError(), Parser\handleInternalLinks2(), Parser\handleTables(), SearchHighlighter\highlightSimple(), SearchHighlighter\highlightText(), MediaWiki\BadFileLookup\isBadFile(), MediaWiki\Block\DatabaseBlock\isWhitelistedFromAutoblocks(), UnifiedDiffFormatter\lines(), DiffFormatter\lines(), MediaWiki\Widget\Search\SimpleSearchResultSetWidget\loadCustomCaptions(), MediaWiki\Widget\Search\InterwikiSearchResultSetWidget\loadCustomCaptions(), Licenses\makeLines(), FormattedRCFeed\notify(), QueryPage\outputResults(), ForeignResourceManager\parseBasicYaml(), DjVuImage\parseFormDjvu(), SearchHighlighter\process(), SquidPurgeClient\processHeaderLine(), SquidPurgeClient\processStatusLine(), Maintenance\readlineEmulation(), XmlTypeCheck\readNext(), EnhancedChangesList\recentChangesBlockGroup(), EnhancedChangesList\recentChangesBlockLine(), Parser\renderImageGallery(), UDPRCFeedEngine\send(), RedisPubSubFeedEngine\send(), SpecialFileDuplicateSearch\showList(), Wikimedia\Rdbms\Database\sourceStream(), WordLevelDiff\split(), SearchHighlighter\splitAndAdd(), MwSql\sqlDoQuery(), OrderedStreamingForkController\updateAvailableSockets(), wfBacktrace(), TableDiffFormatter\wrapLine(), and MediaWiki\Logger\Monolog\MwlogHandler\write().

◆ $mcc

if ($help) $mcc
Initial value:
'persistent' => true,
'debug' => $debug,
] )
memcached client class implemented using (p)fsockopen()
$debug
Definition: mcc.php:31

Definition at line 39 of file mcc.php.

Referenced by McTest\execute().

◆ $optionsWithArgs

$optionsWithArgs = [ 'cache' ]

Definition at line 25 of file mcc.php.

◆ $optionsWithoutArgs

$optionsWithoutArgs
Initial value:
= [
'debug', 'help'
]

Definition at line 26 of file mcc.php.

◆ $quit

$quit = false

Definition at line 117 of file mcc.php.

Referenced by CdbInspector\execute().

◆ $showhelp

$showhelp = false

Definition at line 116 of file mcc.php.

◆ do

do
Initial value:
{
$bad = false

Definition at line 114 of file mcc.php.

◆ else

switch ($command) if ($bad) else
Initial value:
{
print "MediaWiki isn't configured for Memcached usage\n"

Definition at line 54 of file mcc.php.