Manual:getLagTimes.php
Appearance
| Versión de MediaWiki: | ≥ 1.9 |
| Archivo de MediaWiki: getLagTimes.php | |
|---|---|
| Ubicación: | maintenance/ |
| Código fuente: | master • 1.45.3 • 1.44.5 • 1.43.8 |
| Clases: | GetLagTimes |
Detalles
getLagTimes.php file is a maintenance script to display replication lag times from $wgLoadBalancer.
Options/Arguments
| Option | Description | Required? |
|---|---|---|
| --report | Report the lag values to StatsD | Optional |
Usage
php maintenance/run.php getLagTimes [ --report ]
Terminal
$ php maintenance/run.php getLagTimes 10.0.0.236 db3.pmtpa.wmnet 0 10.0.0.237 db4.pmtpa.wmnet 8 ******** 10.0.0.102 samuel.pmtpa.wmnet 1 *
In MediaWiki version MediaWiki 1.39 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