From MediaWiki.org
Jump to navigation Jump to search
Translate this page; This page contains changes which are not marked for translation.

Other languages:
English • ‎français • ‎日本語
MediaWiki extensions manualManual:Extensions
Crystal Clear action run.svg

Release status:Extension status beta

DescriptionTemplate:Extension#description Provides a MediaWiki client for the pool counter daemon
Author(s)Template:Extension#username Tim Starling, Platonides
Database changesTemplate:Extension#needs-updatephp No
LicenseTemplate:Extension#license GNU General Public License 2.0 or later

Translate the PoolCounter extension if it is available at translatewiki.net

Check usage and version matrix.


Open tasks · Report a bug

The PoolCounter extension provides a MediaWiki client for the pool counter daemon.


  • Download and place the file(s) in a directory called PoolCounter in your extensions/ folder.
  • Add the following code at the bottom of your LocalSettings.php:
    wfLoadExtension( 'PoolCounter' );
  • YesY Done - Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

To users running MediaWiki 1.24 or earlier:

The instructions above describe the new way of installing this extension using wfLoadExtension() If you need to install this extension on these earlier versions (MediaWiki 1.24 and earlier), instead of wfLoadExtension( 'PoolCounter' );, you need to use:

require_once "$IP/extensions/PoolCounter/PoolCounter.php";


The C poolcounterd daemon is in the daemon/ directory. It requires libevent to be installed (libevent-dev on Debian-based systems). Run make to build it, and sudo make install to install it.

To make sure it is running, you can run echo 'STATS FULL' | nc -w1 localhost 7531, which should produce output similar to the following:

uptime: 0 days, 0h 0m 21s
total processing time: 0.000000s
average processing time: 0.000000s
gained time: 0.000000s
waiting time: 0.000000s
waiting time for me: 0.000000s
waiting time for anyone: 0.000000s
waiting time for good: 0.000000s
wasted timeout time: 0.000000s
total_acquired: 0
total_releases: 0
hashtable_entries: 0
processing_workers: 0
waiting_workers: 0
connect_errors: 0
failed_sends: 0
full_queues: 0
lock_mismatch: 0
lock_while_waiting: 0
release_mismatch: 0
processed_count: 0


The extension can be configured with the global $wgPoolCountClientConf, which is an associative array with the following keys:

An array of server IP addresses. Adding multiple servers causes locks to be distributed on the client side using a consistent hashing algorithm.
The connect timeout in seconds.

See also[edit]