2016-06-22 20:36:10 +03:00
.TH DMSTATS 8 "Jun 23 2016" "Linux" "MAINTENANCE COMMANDS"
2015-09-23 12:25:00 +03:00
.de OPT_PROGRAMS
. RB \% [ \- \- allprograms | \- \- programid
. IR id ]
. .
.
.de OPT_REGIONS
. RB \% [ \- \- allregions | \- \- regionid
. IR id ]
. .
2016-07-05 21:28:19 +03:00
.de OPT_OBJECTS
. RB [ \- \- area ]
. RB [ \- \- region ]
. RB [ \- \- group ]
. .
2015-09-23 12:25:00 +03:00
.
. \" Print units suffix, use with arg to print human
. \" man2html can't handle too many changes per command
.de UNITS
. BR b | B | s | S | k | K | m | M | \c
. BR g | G | t | T | p | P | e | E ]
. .
.
. \" Print help text for units, use with arg to print human
.de HELP_UNITS
. RB ( b )ytes,
. RB ( s )ectors,
. RB ( k )ilobytes,
. RB ( m )egabytes,
. RB ( g )igabytes,
. RB ( t )erabytes,
. RB ( p )etabytes,
. RB ( e )xabytes.
. nop Capitalise to use multiples of 1000 (S.I.) instead of 1024 .
. .
.
2015-08-05 12:40:00 +03:00
.SH NAME
2015-09-23 12:25:00 +03:00
.
2015-08-05 12:40:00 +03:00
dmstats \(em device-mapper statistics management
2015-09-23 12:25:00 +03:00
.
2015-08-05 12:40:00 +03:00
.SH SYNOPSIS
2015-09-23 12:25:00 +03:00
.
.B dmsetup
.B stats
2015-08-05 12:40:00 +03:00
.I command
.RB [ options ]
2015-09-23 12:25:00 +03:00
.sp
.
2015-09-18 15:34:34 +03:00
.PD 0
2015-09-23 12:25:00 +03:00
.HP
2015-09-18 15:34:34 +03:00
.B dmstats
2015-09-23 12:25:00 +03:00
.de CMD_COMMAND
. ad l
. IR command
. RI [ device_name
. RB | \- \- uuid
. IR uuid | \fB \- \- major
. IR major
. BR \- \- minor
. IR minor ]
. ad b
. .
.CMD_COMMAND
.
2015-09-18 15:34:34 +03:00
.HP
2015-09-23 12:25:00 +03:00
.B dmstats
.de CMD_CLEAR
. ad l
. BR clear
. IR device_name
. OPT_PROGRAMS
. OPT_REGIONS
. ad b
. .
.CMD_CLEAR
.
.HP
.B dmstats
.de CMD_CREATE
. ad l
. BR create
. IR device_name
. RB [ \- \- alldevices ]
. RB [ \- \- areas
. IR nr_areas | \fB \- \- areasize
. IR area_size ]
. RB [ \- \- bounds
. IR \% histogram_boundaries ]
. RB [ \- \- precise ]
. RB [ \- \- start
. IR start_sector
. BR \- \- length
. IR length | \fB \- \- segments ]
2016-07-05 17:54:02 +03:00
. RB \% [ \- \- userdata
. IR user_data ]
2015-09-23 12:25:00 +03:00
. RB [ \- \- programid
. IR id ]
. ad b
. .
.CMD_CREATE
.
.HP
.B dmstats
.de CMD_DELETE
. ad l
. BR delete
. RI [ device_name ]
. RB [ \- \- alldevices ]
. OPT_PROGRAMS
. OPT_REGIONS
. ad b
. .
.CMD_DELETE
.
2015-09-18 15:34:34 +03:00
.HP
2015-09-23 12:25:00 +03:00
.B dmstats
2016-06-22 20:36:10 +03:00
.de CMD_GROUP
. ad l
. BR group
. RI [ device_name ]
. RB [ \- \- alias
. IR name ]
. RB [ \- \- alldevices ]
. RB [ \- \- regions
. IR regions ]
. ad b
. .
.CMD_GROUP
.HP
.B dmstats
2015-09-23 12:25:00 +03:00
.de CMD_HELP
. ad l
. BR help
. RB [ \- c | \- C | \- \- columns ]
. ad b
. .
.CMD_HELP
.
.HP
.B dmstats
.de CMD_LIST
. ad l
. BR list
. RI [ device_name ]
. RB [ \- \- histogram ]
. OPT_PROGRAMS
2016-06-22 20:36:10 +03:00
. RB [ \- \- statstype
. IR type_list ]
2015-09-23 12:25:00 +03:00
. RB [ \- \- units
. IR units ]
2016-07-05 21:28:19 +03:00
. OPT_OBJECTS
2015-09-23 12:25:00 +03:00
. RB \%[ \-\-nosuffix ]
. RB [ \- \- notimesuffix ]
. RB \%[ \-v | \-\-verbose [ \-v | \-\-verbose ]]
. ad b
. .
.CMD_LIST
.
.HP
.B dmstats
.de CMD_PRINT
. ad l
. BR print
. RI [ device_name ]
. RB [ \- \- clear ]
. OPT_PROGRAMS
. OPT_REGIONS
. ad b
. .
.CMD_PRINT
.
.HP
.B dmstats
.de CMD_REPORT
. ad l
. BR report
. RI [ device_name ]
. RB [ \- \- interval
. IR seconds ]
. RB [ \- \- count
. IR count ]
. RB [ \- \- units
. IR units ]
. RB [ \- \- histogram ]
. OPT_PROGRAMS
. OPT_REGIONS
2016-07-05 21:28:19 +03:00
. OPT_OBJECTS
2015-09-23 12:25:00 +03:00
. RB [ \- O | \- \- sort
. IR sort_fields ]
. RB [ \- S | \- \- select
. IR selection ]
2016-06-22 20:36:10 +03:00
. RB [ \- \- statstype
. IR type_list ]
2015-09-23 12:25:00 +03:00
. RB [ \- \- units
. IR units ]
. RB [ \- \- nosuffix ]
. RB \%[ \-\-notimesuffix ]
. ad b
. .
.CMD_REPORT
2016-06-22 20:36:10 +03:00
.HP
.B dmstats
.de CMD_UNGROUP
. ad l
. BR ungroup
. RI [ device_name ]
. RB [ \- \- alldevices ]
. RB [ \- \- groupid
. IR id ]
. ad b
. .
.CMD_UNGROUP
2015-09-23 12:25:00 +03:00
.
.PD
2015-08-05 12:40:00 +03:00
.ad b
2015-09-23 12:25:00 +03:00
.
2015-08-05 12:40:00 +03:00
.SH DESCRIPTION
2015-09-23 12:25:00 +03:00
.
2015-08-05 12:40:00 +03:00
The dmstats program manages IO statistics regions for devices that use
the device-mapper driver. Statistics regions may be created, deleted,
listed and reported on using the tool.
2015-09-23 12:25:00 +03:00
The first argument to dmstats is a \fI command\fP .
2015-08-05 12:40:00 +03:00
2015-09-23 12:25:00 +03:00
The second argument is the \fI device name\fP ,
\fI uuid\fP or \fI major\fP and \fI minor\fP numbers.
2015-08-05 12:40:00 +03:00
Further options permit the selection of regions, output format
control, and reporting behaviour.
When no device argument is given dmstats will by default operate on all
device-mapper devices present. The \fB create\fP and \fB delete\fP
2015-09-23 12:25:00 +03:00
commands require the use of \fB \- \- alldevices\fP when used in this way.
.
2015-08-05 12:40:00 +03:00
.SH OPTIONS
2015-09-23 12:25:00 +03:00
.
.HP
2016-06-22 20:36:10 +03:00
.BR \- \- alias
.IR name
.br
Specify an alias name for a group.
.
.HP
2015-09-23 12:25:00 +03:00
.BR \- \- alldevices
.br
2015-08-13 16:42:55 +03:00
If no device arguments are given allow operation on all devices when
creating or deleting regions.
2015-09-23 12:25:00 +03:00
.
.HP
.BR \- \- allprograms
.br
2015-08-05 12:40:00 +03:00
Include regions from all program IDs for list and report operations.
2015-09-23 12:25:00 +03:00
.br
.HP
.BR \- \- allregions
.br
2015-08-05 12:40:00 +03:00
Include all present regions for commands that normally accept a single
region identifier.
2015-09-23 12:25:00 +03:00
.
.HP
2016-07-05 21:28:19 +03:00
.BR \- \- area
.br
When peforming a list or report, include objects of type area in the
results.
.
.HP
2015-09-23 12:25:00 +03:00
.BR \- \- areas
.IR nr_areas
.br
2015-08-05 12:40:00 +03:00
Specify the number of statistics areas to create within a new region.
2015-09-23 12:25:00 +03:00
.
.HP
.BR \- \- areasize
.IR area_size \c
.RB [ \c
.UNITS
.br
2015-08-05 12:40:00 +03:00
Specify the size of areas into which a new region should be divided. An
2015-09-23 12:25:00 +03:00
optional suffix selects units of:
.HELP_UNITS
.
.HP
.BR \- \- clear
.br
2015-08-05 12:40:00 +03:00
When printing statistics counters, also atomically reset them to zero.
2015-09-23 12:25:00 +03:00
.
.HP
.BR \- \- count
.IR count
.br
2015-08-05 12:40:00 +03:00
Specify the iteration count for repeating reports. If the count
argument is zero reports will continue to repeat until interrupted.
2015-09-23 12:25:00 +03:00
.
.HP
2016-07-05 21:28:19 +03:00
.BR \- \- group
.br
When peforming a list or report, include objects of type group in the
results.
.
.HP
2016-06-22 20:36:10 +03:00
.BR \- \- groupid
.IR id
.br
Specify the group to operate on.
.
.HP
2015-09-23 12:25:00 +03:00
.BR \- \- bounds
.IR histogram_boundaries \c
.RB [ ns | us | ms | s ]
.br
2015-08-18 14:40:03 +03:00
Specify the boundaries of a latency histogram to be tracked for the
region as a comma separated list of latency values. Latency values are
2015-09-23 12:25:00 +03:00
given in nanoseconds. An optional unit suffix of
.BR ns ,
.BR us ,
.BR ms ,
or \fB s\fP may be given after each value to specify units of
nanoseconds, microseconds, miliseconds or seconds respectively.
.
.HP
.BR \- \- histogram
.br
2015-09-04 01:00:44 +03:00
When used with the \fB report\fP and \fB list\fP commands select default
fields that emphasize latency histogram data.
2015-09-23 12:25:00 +03:00
.
.HP
.BR \- \- interval
.IR seconds
.br
2015-08-05 12:40:00 +03:00
Specify the interval in seconds between successive iterations for
2015-09-23 12:25:00 +03:00
repeating reports. If \fB \- \- interval\fP is specified but
\fB \- \- count\fP is not,
2015-08-05 12:40:00 +03:00
reports will continue to repeat until interrupted.
2015-09-23 12:25:00 +03:00
.
.HP
.BR \- \- length
.IR length \c
.RB [ \c
.UNITS
.br
2015-08-05 12:40:00 +03:00
Specify the length of a new statistics region in sectors. An optional
2015-09-23 12:25:00 +03:00
suffix selects units of:
.HELP_UNITS
.
.HP
.BR \- j | \- \- major
.IR major
.br
2015-08-05 12:40:00 +03:00
Specify the major number.
2015-09-23 12:25:00 +03:00
.
.HP
.BR \- m | \- \- minor
.IR minor
.br
2015-08-05 12:40:00 +03:00
Specify the minor number.
2015-09-23 12:25:00 +03:00
.
.HP
.BR \- \- nosuffix
.br
2015-08-05 12:40:00 +03:00
Suppress the suffix on output sizes. Use with \fB \- \- units\fP
(except h and H) if processing the output.
2015-09-23 12:25:00 +03:00
.
.HP
.BR \- \- notimesuffix
.br
2015-09-03 23:55:25 +03:00
Suppress the suffix on output time values. Histogram boundary values
will be reported in units of nanoseconds.
2015-09-23 12:25:00 +03:00
.
.HP
2015-08-05 12:40:00 +03:00
.BR \- o | \- \- options
2015-09-23 12:25:00 +03:00
.br
2015-08-05 12:40:00 +03:00
Specify which report fields to display.
2015-09-23 12:25:00 +03:00
.
.HP
.BR \- O | \- \- sort
.IR sort_fields
.br
2015-08-05 12:40:00 +03:00
Sort output according to the list of fields given. Precede any
2015-09-23 12:25:00 +03:00
sort field with '\fB -\fP ' for a reverse sort on that column.
.
.HP
2015-08-18 14:39:34 +03:00
.BR \- \- precise
2015-09-23 12:25:00 +03:00
.br
2015-08-18 14:39:34 +03:00
Attempt to use nanosecond precision counters when creating new
statistics regions.
2015-09-23 12:25:00 +03:00
.
.HP
.BR \- \- programid
.IR id
.br
2015-08-05 12:40:00 +03:00
Specify a program ID string. When creating new statistics regions this
string is stored with the region. Subsequent operations may supply a
program ID in order to select only regions with a matching value. The
default program ID for dmstats-managed regions is "dmstats".
2015-09-23 12:25:00 +03:00
.
.HP
2016-07-05 21:28:19 +03:00
.BR \- \- region
.br
When peforming a list or report, include objects of type region in the
results.
.
.HP
2015-09-23 12:25:00 +03:00
.BR \- \- regionid
.IR id
.br
2015-09-02 22:35:43 +03:00
Specify the region to operate on.
2015-09-23 12:25:00 +03:00
.
.HP
2016-06-22 20:36:10 +03:00
.BR \- \- regions
.IR region_list
.br
Specify a list of regions to group. The group list is a comma-separated
list of region identifiers. Continuous sequences of identifiers may be
expressed as a hyphen separated range, for example: '1-10'.
.
.HP
2015-08-18 14:40:03 +03:00
.BR \- \- relative
2015-09-23 12:25:00 +03:00
.br
2015-08-18 14:40:03 +03:00
If displaying the histogram report show relative (percentage) values
instead of absolute counts.
2015-09-23 12:25:00 +03:00
.
.HP
.BR \- S | \- \- select
.IR selection
.br
Display only rows that match \fI selection\fP criteria. All rows with the
additional "selected" column (\fB \- o selected\fP ) showing 1 if the row matches
the \fI selection\fP and 0 otherwise. The selection criteria are defined by
2015-08-05 12:40:00 +03:00
specifying column names and their valid values while making use of
supported comparison operators.
2015-09-23 12:25:00 +03:00
.
.HP
.BR \- \- start
.IR start \c
.RB [ \c
.UNITS
.br
2015-08-05 12:40:00 +03:00
Specify the start offset of a new statistics region in sectors. An
2015-09-23 12:25:00 +03:00
optional suffix selects units of:
.HELP_UNITS
.
.HP
.BR \- \- segments
.br
2015-08-05 12:40:00 +03:00
Create a new statistics region for each target contained in the target
device. This causes a separate region to be allocated for each segment
of the device.
2015-09-23 12:25:00 +03:00
.
.HP
2016-06-22 20:36:10 +03:00
.BR \- \- statstype
.IR type_list
.br
Filter the types of statistics object included in a report or listing
according to the provided list. A report may include areas, regions,
and user-defined groups of regions that report aggregate data for all
group members.
The list may be a single object type, a comma separated list of types,
or the special value 'all'.
The currently available object types are 'area', 'region' and 'group'.
.
.HP
2015-09-23 12:25:00 +03:00
.BR \- \- units
.RI [ units ] \c
.RB [ h | H | \c
.UNITS
.br
Set the display units for report output.
All sizes are output in these units:
.RB ( h )uman-readable,
.HELP_UNITS
Can also specify custom units e.g. \fB \- \- units\ 3M\fP .
.
.HP
2016-07-05 21:28:19 +03:00
.BR \- \- userdata
.IR user_data
.br
Specify user data (a word) to be stored with a new region. The value
is added to any internal auxilliary data (for example, group
information), and stored with the region in the aux_data field provided
by the kernel. Whitespace is not permitted.
.
.HP
2015-08-05 12:40:00 +03:00
.BR \- u | \- \- uuid
2015-09-23 12:25:00 +03:00
.br
2015-08-05 12:40:00 +03:00
Specify the uuid.
2015-09-23 12:25:00 +03:00
.
.HP
.BR \- v | \- \- verbose " [" \- v | \- \- verbose ]
2015-08-05 12:40:00 +03:00
.br
2015-09-23 12:25:00 +03:00
Produce additional output.
.
2015-08-05 12:40:00 +03:00
.SH COMMANDS
2015-09-23 12:25:00 +03:00
.
.HP
.CMD_CLEAR
2015-08-05 12:40:00 +03:00
.br
Instructs the kernel to clear statistics counters for the speficied
regions (with the exception of in-flight IO counters).
2015-09-23 12:25:00 +03:00
.
.HP
.CMD_CREATE
2015-08-05 12:40:00 +03:00
.br
Creates one or more new statistics regions on the specified device(s).
The region will span the entire device unless \fB \- \- start\fP and
\fB \- \- length\fP or \fB \- \- target\fP are given. The \fB \- \- start\fP and
\fB \- \- length\fP options allow a region of arbitrary length to be placed
at an arbitrary offset into the device. The \fB \- \- segments\fP option
causes a new region to be created for each target in the corresponding
device-mapper device's table.
2015-08-18 14:39:34 +03:00
If the \fB \- \- precise\fP option is used the command will attempt to
create a region using nanosecond precision counters.
2015-09-23 12:25:00 +03:00
If \fB \- \- bounds\fP is given a latency histogram will be tracked for
2015-08-18 14:40:03 +03:00
the new region. The boundaries of the histogram bins are given as a
comma separated list of latency values. There is an implicit lower bound
of zero on the first bin and an implicit upper bound of infinity (or the
configured interval duration) on the final bin.
Latencies 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, so for example, 10ms
is equivalent to 10000000. Latency values with a precision of less than
one milisecond can only be used when precise timestamps are enabled: if
\fB \- \- precise\fP is not given and values less than one milisecond are
used it will be enabled automatically.
2016-07-05 17:30:31 +03:00
An optional \fB program_id\fP or \fB user_data\fP string may be associated
2015-08-05 12:40:00 +03:00
with the region. A \fB program_id\fP may then be used to select regions
2016-07-05 17:30:31 +03:00
for subsequent list, print, and report operations. The \fB user_data\fP
2015-08-05 12:40:00 +03:00
stores an arbitrary string and is not used by dmstats or the
device-mapper kernel statistics subsystem.
By default dmstats creates regions with a \fB program_id\fP of
2015-08-20 14:18:51 +03:00
"dmstats".
2015-08-05 12:40:00 +03:00
On success the \fB region_id\fP of the newly created region is printed to
stdout.
2015-09-23 12:25:00 +03:00
.
.HP
.CMD_DELETE
2015-08-05 12:40:00 +03:00
.br
Delete the specified statistics region. All counters and resources used
by the region are released and the region will not appear in the output
of subsequent list, print, or report operations.
All regions registered on a device may be removed using
\fB \- \- allregions\fP .
2015-09-23 12:25:00 +03:00
To remove all regions on all devices both \fB \- \- allregions\fP and
2015-08-13 16:42:55 +03:00
\fB \- \- alldevices\fP must be used.
2016-06-22 20:36:10 +03:00
If a \fB \- \- groupid\fP is given instead of a \fB \- \- regionid\fP the
command will attempt to delete the group and all regions that it
contains.
If a deleted region is the first member of a group of regions the group
will also be removed.
.
.HP
.CMD_GROUP
.br
Combine one or more statistics regions on the specified device into a
group.
The list of regions to be grouped is specified with \fB \- \- regions\fP
and an optional alias may be assigned with \fB \- \- alias\fP . The set of
regions is given as a comma-separated list of region identifiers. A
continuous range of identifers spanning from \fB R1\fP to \fB R2\fP may
be expressed as '\fB R1\fP -\fB R2\fP '.
On success the group list and newly created \fB group_id\fP are
printed to stdout.
2015-09-23 12:25:00 +03:00
.
.HP
.CMD_HELP
2015-08-05 12:40:00 +03:00
.br
Outputs a summary of the commands available, optionally including
the list of report fields.
2015-09-23 12:25:00 +03:00
.
.HP
.CMD_LIST
2015-08-05 12:40:00 +03:00
.br
2016-06-22 20:36:10 +03:00
List the statistics regions, areas, or groups registered on the device.
If the \fB \- \- allprograms\fP switch is given all regions will be listed
2015-08-05 12:40:00 +03:00
regardless of region program ID values.
2015-08-14 22:40:13 +03:00
2016-06-22 20:36:10 +03:00
By default only regions and groups are included in list output. If
\fB \- v\fP or \fB \- \- verbose\fP is given the report will also include a
row of information for each configured group and for each area contained
in each region displayed (regions that contain a single area are by
default omitted from the verbose list since their properties are
identical to the area that they contain - to view all regions regardless
of the number of areas they contain use \fB \- \- statstype\fP ).
Specific combinations of objects may be selected using the
\fB \- \- statstype\fP option.
2015-09-04 01:00:44 +03:00
If \fB \- \- histogram\fP is given the report will include the bin count
and latency boundary values for any configured histograms.
2015-09-23 12:25:00 +03:00
.HP
.CMD_PRINT
2015-08-05 12:40:00 +03:00
.br
Print raw statistics counters for the specified region or for all
present regions.
2015-09-23 12:25:00 +03:00
.
.HP
.CMD_REPORT
2015-08-05 12:40:00 +03:00
.br
2016-06-22 20:36:10 +03:00
Start a report for the specified object or for all present objects. If
2015-08-05 12:40:00 +03:00
the count argument is specified, the report will repeat at a fixed
interval set by the \fB \- \- interval\fP option. The default interval is
one second.
If the \fB \- \- allprograms\fP switch is given, all regions will be
listed, regardless of region program ID values.
2015-09-04 01:00:44 +03:00
2015-09-23 12:25:00 +03:00
If the \fB \- \- histogram\fP is given the report will include the histogram
2015-09-04 01:00:44 +03:00
values and latency boundaries.
2015-09-23 12:25:00 +03:00
If the \fB \- \- relative\fP is used the default histogram field displays
2015-09-04 01:00:44 +03:00
bin values as a percentage of the total number of I/Os.
2016-06-22 20:36:10 +03:00
Object types (areas, regions and groups) are selected using the
\fB \- \- statstype\fP option.
2015-09-23 12:25:00 +03:00
.
2016-06-22 20:36:10 +03:00
.HP
.CMD_UNGROUP
.br
Remove an existing group and return all the group's regions to their
original state.
The group to be removed is specified using \fB \- \- groupid\fP .
.
.SH REGIONS, AREAS, AND GROUPS
2015-09-23 12:25:00 +03:00
.
2015-08-05 12:40:00 +03:00
The device-mapper statistics facility allows separate performance
counters to be maintained for arbitrary regions of devices. A region may
span any range: from a single sector to the whole device. A region may
be further sub-divided into a number of distinct areas (one or more),
2016-06-22 20:36:10 +03:00
each with its own counter set. In this case a summary value for the
entire region is also available for use in reports.
In addition, one or more regions on one device can be combined into
a statistics group allowing reporting of aggregate values for all
regions and areas making up the group.
2015-08-05 12:40:00 +03:00
By default new regions span the entire device. The \fB \- \- start\fP and
\fB \- \- length\fP options allows a region of any size to be placed at any
location on the device.
2016-06-22 20:36:10 +03:00
Using offsets it is possible to create regions that map individual
objects within a block device (for example: partitions, files in a file
system, or stripes or other structures in a RAID volume). Groups allow
several non-contiguous regions to be assembled together for reporting
and data aggregation.
2015-08-05 12:40:00 +03:00
A region may be either divided into the specified number of equal-sized
areas, or into areas of the given size by specifying one of
\fB \- \- areas\fP or \fB \- \- areasize\fP when creating a region with the
\fB create\fP command. Depending on the size of the areas and the device
region the final area within the region may be smaller than requested.
2015-09-23 12:25:00 +03:00
.P
.B Region identifiers
.P
2015-08-05 12:40:00 +03:00
Each region is assigned an identifier when it is created that is used to
reference the region in subsequent operations. Region identifiers are
unique within a given device (including across different \fB program_id\fP
values).
2015-09-23 12:25:00 +03:00
2015-08-05 12:40:00 +03:00
Depending on the sequence of create and delete operations, gaps may
exist in the sequence of \fB region_id\fP values for a particular device.
2016-06-22 20:36:10 +03:00
The \fB region_id\fP should be treated as an opaque identifier used to
reference the region.
.
.P
.B Group identifiers
.P
Groups are also assigned an integer identifier at creation time;
like region identifiers, group identifiers are unique within the
containing device.
The \fB group_id\fP should be treated as an opaque identifier used to
reference the group.
2015-09-23 12:25:00 +03:00
.
2015-08-05 12:40:00 +03:00
.SH REPORT FIELDS
2015-09-23 12:25:00 +03:00
.
2015-08-05 12:40:00 +03:00
The dmstats report provides several types of field that may be added to
the default field set, or used to create custom reports.
2015-09-23 12:25:00 +03:00
2015-08-05 12:40:00 +03:00
All performance counters and metrics are calculated per-area.
2015-09-23 12:25:00 +03:00
.
2015-08-05 12:40:00 +03:00
.SS Derived metrics
2015-09-23 12:25:00 +03:00
.
2015-08-05 12:40:00 +03:00
A number of metrics fields are included that provide high level
performance indicators. These are based on the fields provided by the
conventional Linux iostat program and are derived from the basic counter
values provided by the kernel for each area.
2015-09-23 12:25:00 +03:00
.TP
2015-08-22 21:35:43 +03:00
.B reads_merged_per_sec
Reads merged per second.
2015-09-23 12:25:00 +03:00
.TP
2015-08-22 21:35:43 +03:00
.B writes_merged_per_sec
Writes merged per second.
2015-09-23 12:25:00 +03:00
.TP
2015-08-22 21:35:43 +03:00
.B reads_per_sec
Reads completed per second.
2015-09-23 12:25:00 +03:00
.TP
2015-08-22 21:35:43 +03:00
.B writes_per_sec
Writes completed per second.
2015-09-23 12:25:00 +03:00
.TP
2015-08-22 21:35:43 +03:00
.B read_size_per_sec
Size of data read per second.
2015-09-23 12:25:00 +03:00
.TP
2015-08-22 21:35:43 +03:00
.B write_size_per_sec
Size of data written per second.
2015-09-23 12:25:00 +03:00
.TP
2015-08-22 21:35:43 +03:00
.B avg_request_size
Average request size.
2015-09-23 12:25:00 +03:00
.TP
2015-08-22 21:35:43 +03:00
.B queue_size
Average queue size.
2015-09-23 12:25:00 +03:00
.TP
2015-08-05 12:40:00 +03:00
.B await
2015-08-22 21:35:43 +03:00
The average wait time for read and write operations.
2015-09-23 12:25:00 +03:00
.TP
2015-08-05 12:40:00 +03:00
.B r_await
2015-08-22 21:35:43 +03:00
The average wait time for read operations.
2015-09-23 12:25:00 +03:00
.TP
2015-08-05 12:40:00 +03:00
.B w_await
2015-08-22 21:35:43 +03:00
The average wait time for write operations.
2015-09-23 12:25:00 +03:00
.TP
2015-08-22 21:35:43 +03:00
.B throughput
The device throughput in operations per second.
2015-09-23 12:25:00 +03:00
.TP
2015-08-22 21:35:43 +03:00
.B service_time
2015-09-23 12:25:00 +03:00
The average service time (in milliseconds) for operations issued
2015-08-22 21:35:43 +03:00
to the device.
2015-09-23 12:25:00 +03:00
.TP
2015-08-05 12:40:00 +03:00
.B util
Percentage of CPU time during which I/O requests were issued to the
device (bandwidth utilization for the device). Device saturation occurs
when this value is close to 100%.
2015-09-23 12:25:00 +03:00
.
2016-06-22 20:36:10 +03:00
.SS Group, region and area meta fields
2015-09-23 12:25:00 +03:00
.
2016-06-22 20:36:10 +03:00
Meta fields provide information about the groups, regions, or areas that
the statistics values relate to. This includes the region and area
2015-08-05 12:40:00 +03:00
identifier, start, length, and counts, as well as the program ID and
2016-07-05 17:30:31 +03:00
user data values.
2015-09-23 12:25:00 +03:00
.TP
2015-08-05 12:40:00 +03:00
.B region_id
Region identifier. This is a non-negative integer returned by the kernel
when a statistics region is created.
2015-09-23 12:25:00 +03:00
.TP
2015-08-05 12:40:00 +03:00
.B region_start
2015-08-22 21:35:43 +03:00
The region start location. Display units are selected by the
2015-09-23 12:25:00 +03:00
\fB \- \- units\fP option.
.TP
2015-08-05 12:40:00 +03:00
.B region_len
2015-08-22 21:35:43 +03:00
The length of the region. Display units are selected by the
2015-09-23 12:25:00 +03:00
\fB \- \- units\fP option.
.TP
2015-08-05 12:40:00 +03:00
.B area_id
Area identifier. Area identifiers are assigned by the device-mapper
statistics library and uniquely identify each area within a region. Each
ID corresponds to a distinct set of performance counters for that area
of the statistics region. Area identifiers are always monotonically
increasing within a region so that higher ID values correspond to
2015-08-22 21:35:43 +03:00
greater sector addresses within the area and no gaps in the sequence of
identifiers exist.
2015-09-23 12:25:00 +03:00
.TP
2015-08-05 12:40:00 +03:00
.B area_start
2015-08-22 21:35:43 +03:00
The area start location. Display units are selected by the
2015-09-23 12:25:00 +03:00
\fB \- \- units\fP option.
.TP
2015-08-05 12:40:00 +03:00
.B area_len
2015-08-22 21:35:43 +03:00
The length of the area. Display units are selected by the
2015-09-23 12:25:00 +03:00
\fB \- \- units\fP option.
.TP
2015-08-05 12:40:00 +03:00
.B area_count
The number of areas in this region.
2015-09-23 12:25:00 +03:00
.TP
2015-08-05 12:40:00 +03:00
.B program_id
The program ID value associated with this region.
2015-09-23 12:25:00 +03:00
.TP
2016-07-05 17:30:31 +03:00
.B user_data
The user data value associated with this region.
2015-09-23 12:25:00 +03:00
.TP
2016-06-22 20:36:10 +03:00
.B group_id
Group identifier. This is a non-negative integer returned by the dmstats
\fB group\fP command when a statistics group is created.
.TP
2015-08-13 19:29:15 +03:00
.B interval_ns
The estimated interval over which the current counter values have
2015-08-22 21:35:43 +03:00
accumulated. The value is reported as an interger expressed in units
2015-08-13 19:29:15 +03:00
of nanoseconds.
2015-09-23 12:25:00 +03:00
.TP
2015-08-13 19:29:15 +03:00
.B interval
The estimated interval over which the current counter values have
accumulated. The value is reported as a real number in units of
seconds.
2015-09-23 12:25:00 +03:00
.
2015-08-05 12:40:00 +03:00
.SS Basic counters
2015-09-23 12:25:00 +03:00
.
2015-08-05 12:40:00 +03:00
Basic counters provide access to the raw counter data from the kernel,
allowing further processing to be carried out by another program.
2015-09-23 12:25:00 +03:00
.P
2015-08-05 12:40:00 +03:00
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.
2015-09-23 12:25:00 +03:00
.TP
2015-08-22 21:35:43 +03:00
.B read_count
Count of reads completed this interval.
2015-09-23 12:25:00 +03:00
.TP
2015-08-22 21:35:43 +03:00
.B reads_merged_count
Count of reads merged this interval.
2015-09-23 12:25:00 +03:00
.TP
2015-08-22 21:35:43 +03:00
.B read_sector_count
Count of 512 byte sectors read this interval.
2015-09-23 12:25:00 +03:00
.TP
2015-08-22 21:35:43 +03:00
.B read_time
Accumulated duration of all read requests (ns).
2015-09-23 12:25:00 +03:00
.TP
2015-08-22 21:35:43 +03:00
.B write_count
Count of writes completed this interval.
2015-09-23 12:25:00 +03:00
.TP
2015-08-22 21:35:43 +03:00
.B writes_merged_count
Count of writes merged this interval.
2015-09-23 12:25:00 +03:00
.TP
2015-08-22 21:35:43 +03:00
.B write_sector_count
Count of 512 byte sectors written this interval.
2015-09-23 12:25:00 +03:00
.TP
2015-08-05 12:40:00 +03:00
.B write_nsecs
2015-08-22 21:35:43 +03:00
Accumulated duration of all write requests (ns).
2015-09-23 12:25:00 +03:00
.TP
2015-08-22 21:35:43 +03:00
.B in_progress_count
Count of requests currently in progress.
2015-09-23 12:25:00 +03:00
.TP
2015-08-22 21:35:43 +03:00
.B io_ticks
Nanoseconds spent servicing requests.
2015-09-23 12:25:00 +03:00
.TP
2015-08-22 21:35:43 +03:00
.B queue_ticks
2015-08-05 12:40:00 +03:00
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 milliseconds 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.
2015-09-23 12:25:00 +03:00
.TP
2015-08-22 21:35:43 +03:00
.B read_ticks
Nanoseconds spent servicing reads.
2015-09-23 12:25:00 +03:00
.TP
2015-08-22 21:35:43 +03:00
.B write_ticks
Nanoseconds spent servicing writes.
2015-09-23 12:25:00 +03:00
.
2015-08-18 14:40:03 +03:00
.SS Histogram fields
2015-09-23 12:25:00 +03:00
.
2015-08-18 14:40:03 +03:00
Histograms measure the frequency distribution of user specified I/O
latency intervals. Histogram bin boundaries are specified when a region
is created.
2015-09-23 12:25:00 +03:00
.P
2015-08-18 14:40:03 +03:00
A brief representation of the histogram values and latency intervals can
be included in the report using these fields.
2015-09-23 12:25:00 +03:00
.TP
2015-08-18 14:40:03 +03:00
.B 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.
2015-09-23 12:25:00 +03:00
.TP
2015-08-18 14:40:03 +03:00
.B hist_count_bounds
A list of the histogram counts for the current statistics area in order
of ascending latency value including bin boundaries: each count is
prefixed by the lower bound of the corresponding histogram bin.
2015-09-23 12:25:00 +03:00
.TP
2015-08-18 14:40:03 +03:00
.B hist_count_ranges
A list of the histogram counts for the current statistics area in order
of ascending latency value including bin boundaries: each count is
prefixed by both the lower and upper bounds of the corresponding
histogram bin.
2015-09-23 12:25:00 +03:00
.TP
2015-08-18 14:40:03 +03:00
.B hist_percent
A list of the relative histogram values for the current statistics area
in order of ascending latency value, expressed as a percentage. Each
value represents the proportion of I/Os with latency times falling into
that bin's time range during the sample period.
2015-09-23 12:25:00 +03:00
.TP
2015-08-18 14:40:03 +03:00
.B hist_percent_bounds
A list of the relative histogram values for the current statistics area
in order of ascending latency value, expressed as a percentage and
including bin boundaries. Each value represents the proportion of I/Os
with latency times falling into that bin's time range during the sample
period and is prefixed with the corresponding bin's lower bound.
2015-09-23 12:25:00 +03:00
.TP
2015-08-18 14:40:03 +03:00
.B hist_percent_ranges
A list of the relative histogram values for the current statistics area
in order of ascending latency value, expressed as a percentage and
including bin boundaries. Each value represents the proportion of I/Os
with latency times falling into that bin's time range during the sample
period and is prefixed with the corresponding bin's lower and upper
bounds.
2015-09-23 12:25:00 +03:00
.TP
2015-08-18 14:40:03 +03:00
.B hist_bounds
A list of the histogram boundary values for the current statistics area
in order of ascending latency value. The values are expressed in whole
units of seconds, miliseconds, microseconds or nanoseconds with a suffix
indicating the unit.
2015-09-23 12:25:00 +03:00
.TP
2015-08-18 14:40:03 +03:00
.B hist_ranges
A list of the histogram bin ranges for the current statistics area in
order of ascending latency value. The values are expressed as
"LOWER-UPPER" in whole units of seconds, miliseconds, microseconds or
nanoseconds with a suffix indicating the unit.
2015-09-23 12:25:00 +03:00
.TP
2015-08-18 14:40:03 +03:00
.B hist_bins
The number of latency histogram bins configured for the area.
2015-09-23 12:25:00 +03:00
.
2015-08-05 12:40:00 +03:00
.SH EXAMPLES
2015-09-23 12:25:00 +03:00
.
2015-08-05 12:40:00 +03:00
Create a whole-device region with one area on vg00/lvol1
.br
2015-09-23 12:25:00 +03:00
#
.B dmstats create vg00/lvol1
2015-08-05 12:40:00 +03:00
.br
2015-08-16 21:30:16 +03:00
vg00/lvol1: Created new region with 1 area(s) as region ID 0
2015-09-23 12:25:00 +03:00
.P
2015-08-05 12:40:00 +03:00
Create a 32M region 1G into device d0
.br
2015-09-23 12:25:00 +03:00
#
.B dmstats create \- \- start 1 G \- \- length 32 M d0
2015-08-05 12:40:00 +03:00
.br
2015-08-16 21:30:16 +03:00
d0: Created new region with 1 area(s) as region ID 0
2015-09-23 12:25:00 +03:00
.P
2015-08-05 12:40:00 +03:00
Create a whole-device region with 8 areas on every device
.br
.br
2015-09-23 12:25:00 +03:00
#
.B dmstats create \- \- areas 8
2015-08-05 12:40:00 +03:00
.br
2015-09-02 14:19:13 +03:00
vg00-lvol1: Created new region with 8 area(s) as region ID 0
2015-08-05 12:40:00 +03:00
.br
2015-09-02 14:19:13 +03:00
vg00-lvol2: Created new region with 8 area(s) as region ID 0
2015-08-05 12:40:00 +03:00
.br
2015-09-02 14:19:13 +03:00
vg00-lvol3: Created new region with 8 area(s) as region ID 0
2015-08-05 12:40:00 +03:00
.br
2015-09-02 14:19:13 +03:00
vg01-lvol0: Created new region with 8 area(s) as region ID 2
2015-08-05 12:40:00 +03:00
.br
2015-09-02 14:19:13 +03:00
vg01-lvol1: Created new region with 8 area(s) as region ID 0
2015-08-05 12:40:00 +03:00
.br
2015-09-02 14:19:13 +03:00
vg00-lvol2: Created new region with 8 area(s) as region ID 1
2015-09-23 12:25:00 +03:00
.P
2015-08-05 12:40:00 +03:00
Delete all regions on all devices
.br
.br
2015-09-23 12:25:00 +03:00
#
.B dmstats delete \- \- alldevices \- \- allregions
.P
2015-08-05 12:40:00 +03:00
Create a whole-device region with areas 10GiB in size on vg00/lvol1
using dmsetup
.br
.br
2015-09-23 12:25:00 +03:00
#
.B dmsetup stats create \- \- areasize 10 G vg00/lvol1
2015-08-05 12:40:00 +03:00
.br
2015-09-02 14:19:13 +03:00
vg00-lvol1: Created new region with 5 area(s) as region ID 1
2015-09-23 12:25:00 +03:00
.P
2015-08-05 12:40:00 +03:00
Create a 1GiB region with 16 areas at the start of vg00/lvol1
.br
2015-09-23 12:25:00 +03:00
#
.B dmstats create \- \- start 0 \- \- len 1 G \- \- areas=16 vg00/lvol1
2015-08-05 12:40:00 +03:00
.br
2015-09-02 14:19:13 +03:00
vg00-lvol1: Created new region with 16 area(s) as region ID 0
2015-09-23 12:25:00 +03:00
.P
2015-08-05 12:40:00 +03:00
List the statistics regions registered on vg00/lvol1
.br
2015-09-23 12:25:00 +03:00
#
.B dmstats list vg00/lvol1
2015-08-05 12:40:00 +03:00
.br
2015-08-16 21:30:16 +03:00
Name RgID RStart RSize #Areas ASize ProgID
2015-08-05 12:40:00 +03:00
.br
2015-08-16 21:30:16 +03:00
vg00-lvol1 0 0 61.00g 1 61.00g dmstats
2015-08-05 12:40:00 +03:00
.br
2015-08-16 21:30:16 +03:00
vg00-lvol1 1 61.00g 19.20g 1 19.20g dmstats
2015-08-05 12:40:00 +03:00
.br
2015-08-16 21:30:16 +03:00
vg00-lvol1 2 80.20g 2.14g 1 2.14g dmstats
2015-09-23 12:25:00 +03:00
.P
2015-08-05 12:40:00 +03:00
Display five statistics reports for vg00/lvol1 at an interval of one second
.br
.br
2015-09-23 12:25:00 +03:00
#
.B dmstats report \- \- interval 1 \- \- count 5 vg00/lvol1
2015-08-05 12:40:00 +03:00
.br
2015-09-23 12:25:00 +03:00
#
.B dmstats report
2015-08-05 12:40:00 +03:00
.br
2015-08-16 21:30:16 +03:00
Name RgID ArID AStart ASize RRqM/s WRqM/s R/s W/s RSz/s WSz/s AvRqSz QSize Util% AWait RdAWa WrAWa
2015-08-05 12:40:00 +03:00
.br
2015-08-16 21:30:16 +03:00
vg_hex-lv_home 0 0 0 61.00g 0.00 0.00 0.00 218.00 0 1.04m 4.50k 2.97 81.70 13.62 0.00 13.62
2015-08-05 12:40:00 +03:00
.br
2015-08-16 21:30:16 +03:00
vg_hex-lv_home 1 0 61.00g 19.20g 0.00 0.00 0.00 5.00 0 548.00k 109.50k 0.14 11.00 27.40 0.00 27.40
2015-08-05 12:40:00 +03:00
.br
2015-08-16 21:30:16 +03:00
vg_hex-lv_home 2 0 80.20g 2.14g 0.00 0.00 0.00 14.00 0 1.15m 84.00k 0.39 18.70 27.71 0.00 27.71
2015-09-23 12:25:00 +03:00
.P
2015-08-05 12:40:00 +03:00
Create one region for reach target contained in device vg00/lvol1
.br
.br
2015-09-23 12:25:00 +03:00
#
.B dmstats create \- \- segments vg00/lvol1
2015-08-05 12:40:00 +03:00
.br
2015-09-02 14:19:13 +03:00
vg00-lvol1: Created new region with 1 area(s) as region ID 0
2015-08-05 12:40:00 +03:00
.br
2015-09-02 14:19:13 +03:00
vg00-lvol1: Created new region with 1 area(s) as region ID 1
2015-08-05 12:40:00 +03:00
.br
2015-09-02 14:19:13 +03:00
vg00-lvol1: Created new region with 1 area(s) as region ID 2
2015-09-23 12:25:00 +03:00
.P
2015-08-05 12:40:00 +03:00
Print raw counters for region 4 on device d0
.br
2015-09-23 12:25:00 +03:00
#
.B dmstats print \- \- regionid 4 d0
2015-08-05 12:40:00 +03:00
.br
2097152+65536 0 0 0 0 29 0 264 701 0 41 701 0 41
2015-09-23 12:25:00 +03:00
.
2015-08-05 12:40:00 +03:00
.SH AUTHORS
2015-09-23 12:25:00 +03:00
.
2015-08-05 12:40:00 +03:00
Bryn M. Reeves <bmr@redhat.com>
2015-09-23 12:25:00 +03:00
.
2015-08-05 12:40:00 +03:00
.SH SEE ALSO
2015-09-23 12:25:00 +03:00
.
2015-09-18 15:34:34 +03:00
.BR dmsetup (8)
2015-09-23 12:25:00 +03:00
LVM2 resource page: https://www.sourceware.org/lvm2/
2015-08-05 12:40:00 +03:00
.br
Device-mapper resource page: http://sources.redhat.com/dm/
.br
Device-mapper statistics kernel documentation
.br
2015-09-23 12:25:00 +03:00
.I Documentation/device-mapper/statistics.txt