lvmsar
Report LVM activity
SYNOPSIS
lvmsar [options] [interval [count]]
PARAMETERS
-d {LV|VG|PV}
Report activity on logical volumes, volume groups or physical volumes.
-V {VGname}
Limit the report to the specified volume group. Repeat for multiple volume groups.
-I {interval}
Set the collection interval (in seconds).
-c {count}
Set the number of iterations.
-o {filename}
Save the data to a file in binary format.
-f {filename}
Read the data from the specified binary file.
-P
Pretty-print LVM names; useful for very long names.
-h
Display help text.
-V
Display version information.
DESCRIPTION
The lvmsar
command collects, reports, and saves LVM (Logical Volume Manager) activity information. It's essentially an LVM-aware version of sar
. lvmsar
analyzes system activity related to LVM devices, providing statistics such as throughput, I/O rates, and utilization for logical volumes and volume groups. This tool is invaluable for identifying performance bottlenecks, understanding I/O patterns, and optimizing LVM configurations.lvmsar
uses the lvm2
kernel driver for I/O statistics gathering which must be installed. The gathered statistics can be displayed on the terminal or saved in a binary file (using the -o
option) for later analysis.
It can display historical data if log files are available, or can monitor activity in real-time. By default, lvmsar
retrieves information from all defined Volume Groups but can be limited to a certain Volume Group, Logical Volume or Physical Volume. It can provide detailed insight into disk I/O and the performance of the storage infrastructure. The command's flexibility allows for tailored monitoring based on specific requirements.
CAVEATS
The lvmsar
command relies on the lvm2
kernel driver being installed and active to collect I/O statistics. Without this driver, lvmsar
will not be able to collect or display useful information. Ensure the statistics options are set in the lvm.conf file.
OUTPUT INTERPRETATION
The output of lvmsar
includes key metrics such as:
* tps
: Transfers per second to the LVM device.
* rd_sec/s
: Number of sectors read per second.
* wr_sec/s
: Number of sectors written per second.
* avgrq-sz
: Average size (in sectors) of the requests.
* avgqu-sz
: Average queue length of the requests.
* await
: Average time (in milliseconds) for I/O requests to be served (including queue time).
* svctm
: Service time (in milliseconds) which is time the device (disk) needs to actually service the request
* %util
: Percentage of CPU time during which I/O requests were issued to the device (device utilization).
CONFIGURATION
lvmsar
uses the configuration in lvm.conf
. This file determines how statistics are gathered. Ensure the required options are set to enable gathering of statistics.
HISTORY
lvmsar
was developed as part of the LVM2 project to provide administrators with a tool specifically for monitoring LVM activity. It expands upon the system-wide monitoring capabilities of tools like sar
by focusing on LVM-specific metrics.
The use of lvmsar
has grown alongside the adoption of LVM as a standard storage management solution in many Linux distributions. Its ability to pinpoint performance issues within LVM setups has made it a valuable tool for system administrators and performance engineers.