What is Sar Command?

Sar is a versatile tool that provides crucial insights into 
system activity and performance. It collects, reports, and
archives a wide range of system statistics. Sar is particularly
valuable for troubleshooting performance issues and
retroactively analyzing load values for various subsystems
such as CPUs, memory, disks, interrupts, and network interfaces.

By default, Sar log files are stored in /var/log/sa/ with
filenames like saXX where XX corresponds to the day of
the month.

Here are some common Sar commands and their purposes:
# sar 1 3: Provides system-wide CPU statistics three times with a one-second interval.

# sar -u: Presents CPU usage statistics for all CPUs.

# sar -P ALL 1 1: Offers CPU usage details for individual CPUs.

# sar -r: Reports on memory free and usage, with options for continuous monitoring (e.g., sar -r 1 3).

# sar -S: Displays swap space utilization.

# sar -b: Summarizes overall I/O activities, including metrics like transactions per second (tps), read transactions per second (rtps), write transactions per second (wtps), bytes read per second (bread/s), and bytes written per second (bwrtn/s).

# sar -d: Provides insights into individual block device I/O activities. When used with the -p option, it displays the actual device names (e.g., sda, sda1, sdb1, etc.).

# sar -q: Reports on the run queue and load average, offering a glimpse into system demand and resource contention.
These Sar commands enable administrators and analysts to 
assess various facets of system performance, helping them
identify and address potential issues.

Leave a Reply

Your email address will not be published. Required fields are marked *