Reports input/output statistics for logical partitions, logical volumes and volume groups.
lvmstat { -l | -v } Name [ -e | -d ] [ -F ] [ -C ] [ -c Count ] [ -s ] [ Interval [ Iterations ] ]
The lvmstat command generates reports that can be used to change logical volume configuration to better balance the input/output load between physical disks.
By default, the statistics collection is not enabled in the system. You must use the -e flag to enable this feature for the logical volume or volume group in question. Enabling the statistics collection for a volume group enables for all the logical volume in that volume group.
The first report generated by lvmstat provides statistics concerning the time since the system was booted. Each subsequent report covers the time since the previous report. All statistics are reported each time lvmstat runs. The report consists of a header row followed by a line of statistics for each logical partition or logical volume depending on the flags specified.
If the -l flag is specified, Name is the logical volume name, and the statistics are for the physical partitions of this logical volume. The mirror copies of the logical partitions are considered individually for the statistics reporting. They are listed in descending order of number of i/os (iocnt) to the partition.
The Interval parameter specifies the amount of time, in seconds, between each report. The first report contains statistics for the time since the volume group startup, varyonvg. Each subsequent report contains statistics collected during the interval since the previous report. If the Count parameter is specified, only the top Count lines of the report are generated. For a logical volume if Count is 10, only the 10 busiest partitions are identified. If the Iterations parameter is specified in conjunction with the Interval parameter, then only that many iterations are run. If no Iterations parameter is specified, lvmstat generates reports continuously. If Interval is used to run lvmstat more than once, no reports are printed if the statistics did not change since the last run. A single period . (period) is printed instead.
The lvmstat command is useful in determining whether a physical volume is becoming a hindrance to performance by identifying the busiest physical partitions for a logical volume.
Note: The lvmstat commands reports I/O statistics of the local node only.
The lvmstat command generates two types of reports, per partition statistics in a logical volume and per logical volume statistics in a volume group. The reports has the following format:
Column | Description |
Log_part | Logical partition number |
mirror#Log_part | Mirror copy number of the logical partition |
iocntLog_part | Number of read and write requests |
Kb_readLog_part | The total number of kilobytes read |
Kb_wrtnLog_part | The total number of kilobytes written |
KbpsLog_part | The amount of data transferred in kilobytes per second |
To use lvmstat, you must have root user authority.
lvmstat -v datavg -e
lvmstat -l hd2
lvmstat -v uservg -c 5
lvmstat -l ramlv 2
lvmstat -v rootvg 2 6
lvmstat -v uservg -C
lvmstat -l datalv -d
/usr/sbin/lvmstat | Contains the lvmstat command. |
The knlist subroutine.
The /dev/kmem special file.