SAR Cheatsheet

Published: 2018-04-19 18:03:02 +0000
Categories: Misc,




sar can be an incredibly helpful utility when examining system performance (especially after the fact), but if not used regularly it's easy to forget which flags to use

This short post details a number of useful arguments to pass

Based On


# Basic Output

# CPU Usage per Core
sar -P ALL

# Memory Usage
sar -r

# Swap Usage
sar -S

# I/O
sar -b

# I/O by Block Device
sar -d -p

# Check Run Queue and Load Average
sar -q

# Network Stats
sar -n DEV

# Where DEV can be one of the following
# DEV â Displays network devices vital statistics for eth0, eth1, etc.,
# EDEV â Display network device failure statistics
# NFS â Displays NFS client activities
# NFSD â Displays NFS server activities
# SOCK â Displays sockets in use for IPv4
# IP â Displays IPv4 network traffic
# EIP â Displays IPv4 network errors
# ICMP â Displays ICMPv4 network traffic
# EICMP â Displays ICMPv4 network errors
# TCP â Displays TCPv4 network traffic
# ETCP â Displays TCPv4 network errors
# UDP â Displays UDPv4 network traffic
# SOCK6, IP6, EIP6, ICMP6, UDP6 are for IPv6
# ALL â This displays all of the above information. The output will be very long.

# Historic Information
# By default, sar will output for the previous 24 hours, 
# however previous days can be checked with
sar -f /var/log/sa/sa15 -n DE

Usage Example

# Check Memory usage for yesterday
sar -f /var/log/sa/sa`date --date='-1 day' +'%d'` -r


SAR, cheatsheet, sysstat, system performance, system resources, monitoring, historic,

Latest Posts

Copyright © 2022 Ben Tasker | Sitemap | Privacy Policy
Available at, http://phecoopwm6x7azx26ctuqcp6673bbqkrqfeoiz2wwk36sady5tqbdpqd.onion and http://snippets.bentasker.i2p
hit counter