Reports input/output statistics for logical partitions, logical volumes and volume groups. Also reports pbuf and blocked I/O statistics and allows pbuf allocation changes to 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.
Input/Output Reports
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 |
Item | Description |
---|---|
-c Count | Prints only the specified number of lines of statistics. |
-C | Causes the counters that keep track of the iocnt, Kb_read and Kb_wrtn be cleared for the specified logical volume/volume group. |
-d | Specifies that statistics collection should be disabled for the logical volume/volume group in question. |
-e | Specifies that statistics collection should be enabled for the logical volume/volume group in question. |
-F | Causes the statistics to be printed colon-separated. |
-l | Specifies the name of the stanza to list. |
-s | Suppresses the header from the subsequent reports when Interval is used. |
-v | Specifies that the Name specified is the name of the volume group. |
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
Item | Description |
---|---|
/usr/sbin/lvmstat | Contains the lvmstat command. |