Lockstat PMDA
=============

The lockstat PMDA exports counters about lock call rates, and
wait/hold times. The exported values are raw counters. Currently
only the lockstat.detail metrics are implemented - the metrics
in this subtree are enumerated over the lock name, caller
return address, and CPU number in the format "lockname:caller:cpu".

Metrics in the other two subtrees would (when implemented) export
aggregated counters. These would be aggregated counts for each
lock, aggregated over all callers and CPUs (for the "lockstat.all"
subtree), and aggregated counts for each lock and caller, aggregated
over all CPUs (for lockstat.percaller). For the moment, only the
lockstat.detail subtree is implemented. If there is any interest
in the other subtrees, we can spend the additional time.

Metrics
=======

The file ./help contains descriptions for all of the metrics exported
by this PMDA.

Once the PMDA has been installed, the following command will list all
the available metrics and their explanatory "help" text:

	$ pminfo -fT lockstat.detail

Installation
============

 +  First you need to make install the source into /var/pcp/pmdas/lockstat
    before you can run the "Install" script. The "Install" script 
    asks a few questions, and then configures PCP to integrate the
    new lockstat metrics with the existing metrics. If you are reading
    this README in the /var/pcp/pmdas/lockstat directory, then everything
    is cool.

 +  Check that there is no clash in the Performance Metrics Domain
    defined in ./domain.h and the other PMDAs currently in use
    (/etc/pmcd.conf).  If there is, edit ./domain.h to choose another
    domain number.

 +  Then simply use

	# ./Install

    and choose both the "collector" and "monitor" installation
    configuration options.

    You will be prompted for the location of the System.map that
    corresponds to the currently running lockstat-patched-kernel.
    This file is created during the kernel build and is normally
    located in the top level kernel source directory.

    Everything else is automated.

De-installation
===============

 +  Simply use

	# ./Remove

Troubleshooting
===============

 +  After installing or restarting the agent, the PMCD log file
    (/var/log/pcp/pmcd/pmcd.log) and the PMDA log file
    (/var/log/pcp/pmcd/lockstat.log) should be checked for any
    warnings or errors.
