| MediaWiki version: | ≥ 1.9 | 
| MediaWiki file: getLagTimes.php | |
|---|---|
| Location: | maintenance/ | 
| Source code: | master • 1.40.0 • 1.39.4 • 1.35.11 | 
| Classes: | GetLagTimes | 
Details
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/getLagTimes.php [ --report ]
Terminal
$ php maintenance/getLagTimes.php 10.0.0.236 db3.pmtpa.wmnet 0 10.0.0.237 db4.pmtpa.wmnet 8 ******** 10.0.0.102 samuel.pmtpa.wmnet 1 *
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/getLagTimes.php
    sleep 5
done
See also
- $wgLoadBalancer
- Lag.php
- BenchmarkPurge.php
    This article is issued from Mediawiki. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.