LinuxCommandLibrary

lvmsadc

Collect and report LVM usage statistics

SYNOPSIS

lvmsadc { start | stop | status | report [options] }

PARAMETERS

start
    Initializes and begins the LVM activity data collection process. This command is typically configured to run periodically via cron to ensure continuous data capture.

stop
    Halts the LVM activity data collection process, preventing further LVM metrics from being recorded.

status
    Displays the current status of the lvmsadc collector, indicating whether data collection is active or not.

report [options]
    Generates reports from the collected LVM activity data. This subcommand acts as a wrapper for sar -S LVM and often accepts standard sar options for filtering and formatting the output (e.g., -f filename to specify a data file, -s HH:MM:SS and -e HH:MM:SS for time range).

DESCRIPTION

The lvmsadc command is an LVM2 system activity data collector. It integrates LVM2 activity metrics with the standard sadc (System Activity Data Collector) and sar (System Activity Reporter) utilities. Its primary purpose is to enable detailed performance monitoring and historical analysis of LVM operations, such as volume group and logical volume usage, I/O statistics, and other LVM-specific events.

Data collected by lvmsadc is stored in the same binary data files as other system activity statistics (typically in /var/log/sa/saXX), allowing users to view LVM-specific metrics alongside other system performance data using the sar command, specifically with the -S LVM option. This integration is crucial for administrators needing to diagnose performance bottlenecks or understand resource consumption related to LVM storage infrastructure over time.

CAVEATS

The lvmsadc command requires the sysstat package (which provides sadc and sar) to be installed and properly configured. It typically needs root privileges to execute. Ensure that the sadc cron jobs are correctly set up to capture LVM activity data periodically. The collected data can consume disk space, so monitoring /var/log/sa/ is advisable.

INTEGRATION WITH SAR

After collection is started by lvmsadc start, LVM activity data can be viewed using the sar command with the -S LVM option. For example, sar -S LVM -f /var/log/sa/saXX will display LVM-specific statistics from the specified daily activity file. This allows for detailed analysis of LVM performance over time, including metrics like LVM metadata operations, I/O rates on logical volumes, and more.

TYPICAL SETUP

To use lvmsadc effectively, it's typically set up via cron. The sadc cron job (e.g., /etc/cron.d/sysstat on some systems) should be configured to run sadc -S LVM periodically (e.g., every 10 minutes). The lvmsadc start command itself might also be added to system startup scripts to ensure continuous monitoring after a reboot.

HISTORY

lvmsadc is part of the lvm2 suite of tools. Its development aimed to provide deeper insight into LVM-specific performance characteristics, complementing the general system activity monitoring capabilities of sadc and sar. It was introduced to bridge the gap in detailed LVM performance metrics that were not natively captured by standard system monitoring tools, enabling administrators to get a holistic view of storage performance that includes the LVM layer.

SEE ALSO

lvm(8), sadc(8), sar(1), iostat(1), vmstat(8)

Copied to clipboard