PMDADM(1)
π PMDADM π
okay bestie, gather round, because this is the pmdadm manual page β it lives in the General Commands Manual section (that's section 1, iykyk) and it's all about the Device Mapper PMDA. slay. let's get into it π
β¨ NAME β¨
pmdadm β the Device Mapper PMDA. that's it, that's the name, short and iconic π
πΈ SYNOPSIS πΈ
$PCP_PMDAS_DIR/dm/pmdadm [-D debug]
π¦ DESCRIPTION π¦
so, pmdadm is a Performance Metrics Domain Agent (PMDA) β and what a PMDA does is export metric values, and this one exports them for Device Mapper on your local system. local only, bestie, we're not reaching across the network here π«Ά
it collects its data through the dmsetup(8) utility and the dmstats API, and fr fr it requires that the program is installed for it to function at all. no dmsetup, no metrics, periodt. also!! you need at least one statistics region created using the dmstats(8) utility before you'll get basic counter values. there's examples further down, don't worry π
β οΈ big important note: device-mapper statistics collection is not enabled by default and is not persistent across reboots β unless a system administrator has set up something to run inrc.localor the equivalent. why? because there are overheads associated with statistics collection. also, thepmdadmPMDA does not automatically enable any statistics collection, because it might not be the only consumer of that data. polite of it honestly π
π INSTALLATION π
install the DM PMDA by using the Install script as root:
# cd $PCP_PMDAS_DIR/dm
# ./Install
to uninstall, the following must be done as root:
# cd $PCP_PMDAS_DIR/dm
# ./Remove
pmdadm is launched by pmcd(1) and should never be executed directly. like, ever. it's giving "I have a handler" energy. the Install and Remove scripts notify pmcd when the agent is installed or removed π
π CONFIGURATION π
this PMDA uses the dmstats API (the userspace device-mapper support library) to capture device-mapper performance data.
using this PMDA, you need the userspace device-mapper support library (libdevmapper) and the userspace command line tool dmstats(8). and before device-mapper metrics will be available for PCP, statistics regions have to be created. for example, to enable basic statistics for all local device-mapper logical devices, use the following command:
# dmstats create --alldevices
to create statistics regions with specified histogram boundaries, use the following:
# dmstats create --alldevices --bounds histogram_boundaries
specify the boundaries of a latency histogram to be tracked for the region as a comma separated list of latency values. latency values are given in nanoseconds. an optional unit suffix of ns, us, ms, or s may be given after each value to specify units of nanoseconds, microseconds, miliseconds or seconds respectively. for example,
# dmstats create --alldevices --bounds 10us,30us,50us,70us,90us
further details and more complex examples can be found in dmstats(8). go read it, it eats π
β METRICS β
π Basic Counters
basic counters provide access to the raw counter data from the kernel, allowing further processing to be carried out by another program.
the Kernel provides thirteen separate counters for each statistics area. the first eleven of these match the counters provided in /proc/diskstats or /sys/block/*/*/stat. the final pair provide separate counters for read and write time.
dmstats.readβ count of reads completed this interval per device-mapper device.dmstats.reads_mergedβ count of reads merged this interval per device-mapper device.dmstats.read_bytesβ count of kbytes read this interval per device-mapper device.dmstats.reads_timeβ accumulated duration of all read requests per device-mapper device.dmstats.writeβ count of writes completed this interval per device-mapper device.dmstats.writes_mergedβ count of writes completed this interval per device-mapper device.dmstats.write_bytesβ count of kbytes write this interval per device-mapper device.dmstats.writes_timeβ accumulated duration of all write requests per device-mapper device.dmstats.in_progressβ count of requests currently in progress per device-mapper device.dmstats.io_ticksβ nanoseconds spent servicing request per device-mapper device.dmstats.queue_ticksβ this field is incremented at each I/O start, I/O completion, I/O merge, or read of these stats by the number of I/Os in progress multiplied by the number of nanoseconds spent doing I/O since the last update of this field. this can provide an easy measure of both I/O completion time and the backlog that may be accumulating.dmstats.read_ticksβ nanoseconds spent servicing reads per device-mapper device.dmstats.write_ticksβ nanoseconds spent servicing writes per device-mapper device.
π§ Histogram fields
histograms measure the frequency distribution of user specified I/O latency intervals. histogram bin boundaries are specified when a region is created.
instance name represents devicename, region id and bin boundaries. that's the whole vibe.
dmstats.histogram.hist_countβ a list of the histogram counts for the current statistics area in order of ascending latency value. each value represents the number of I/Os with latency times falling into that bin's time range during the sample period.dmstats.histogram.hist.binsβ the number of latency histogram bins configured for the area.
π₯ EXAMPLES π₯
# dmstats create looptest0 --bounds 10us,30us,50us
looptest0: Created new region with 1 area(s) as region ID 0
# pminfo -f dmstats.read dmstats.histogram.hist_count
dmstats.read
inst [0 or "looptest0"] value 4099
dmstats.histogram.hist_count
inst [0 or "looptest0:0:0s"] value 1
inst [1 or "looptest0:0:10us"] value 3752
inst [2 or "looptest0:0:30us"] value 250
inst [3 or "looptest0:0:50us"] value 96
look at those numbers. obsessed ππ
π FILES π
$PCP_PMDAS_DIR/dm/helpβ default help text file for the dm metrics.$PCP_PMDAS_DIR/dm/Installβ installation script for thepmdadmagent.$PCP_PMDAS_DIR/dm/Removeβ undo installation script for thepmdadmagent.$PCP_LOG_DIR/pmcd/dm.logβ default log file for error messages frompmdadm.
π PCP ENVIRONMENT π
environment variables with the prefix PCP_ are used to parameterize the file and directory names used by PCP. on each installation, the file /etc/pcp.conf contains the local values for these variables. the $PCP_CONF variable may be used to specify an alternative configuration file, as described in pcp.conf(5). very configurable, very demure β¨
π DEBUGGING OPTIONS π
the -D or --debug option enables the output of additional diagnostics on stderr to help triage problems β although ngl, the information is sometimes cryptic and primarily intended to provide guidance for developers rather than for end-users. debug is a comma separated list of debugging options; use pmdbg(1) with the -l option to obtain a list of the available debugging options and their meaning. go forth and debug, bestie π
π SEE ALSO π
PCPIntro(1), pmcd(1), pmstore(1), dmsetup(8) and dmstats(8).
and that's the whole page, no cap π«Ά this one came out of Performance Co-Pilot (that's the source, and the version tag is just PCP, iconic and mysterious) β same title PMDADM(1), same section 1, we just gave it the glow-up it deserved. mwah π
ππΈ
π¦ where this page comes from
- arch rolling: pcp 7.2.2-2 Β· GPL-2.0-or-later AND LGPL-2.1-or-later AND CC-BY-3.0
- fedora 43: pcp-doc 7.2.1-1.fc43
- fedora 43: pcp-doc 7.2.2-1.fc43
- fedora 43: pcp-doc 7.2.2-2.fc43 Β· GPL-2.0-or-later AND CC-BY-3.0
- fedora 44: pcp-doc 7.2.1-1.fc44
- fedora 44: pcp-doc 7.2.2-1.fc44
- fedora 44: pcp-doc 7.2.2-2.fc44 Β· GPL-2.0-or-later AND CC-BY-3.0
- ubuntu stonking: pcp 7.2.1-2build1
- Copyright (c) 2015 Red Hat
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms