Jump to content

Manual:getLagTimes.php

From mediawiki.org
MediaWiki version:
1.9

Details

[edit]

getLagTimes.php file is a maintenance script to display replication lag times from $wgLoadBalancer .

Options/Arguments

[edit]
Option Description Required?
--report Report the lag values to StatsD Optional

Usage

[edit]
php maintenance/run.php getLagTimes [ --report ]
Terminal
In MediaWiki version 1.39.10 and earlier, you must invoke maintenance scripts using php maintenance/scriptName.php instead of php maintenance/run.php scriptName.

The script can be repeatedly called from the command line to create a simple 'lagtop' script that monitors a cluster's status.

# simple shell script to run getLagTimes.php every five seconds
while [true]
do
    php maintenance/run.php getLagTimes
    sleep 5
done

See also

[edit]