LinuxCommandLibrary

sar

TLDR

Report I/O statistics every second

$ sar -b 1
copy
Report network statistics every 2 seconds, 10 times
$ sar -n DEV 2 10
copy
Report CPU utilization every 2 seconds
$ sar -u ALL 2
copy
Report memory utilization
$ sar -r ALL 1 20
copy
Report run queue and load averages
$ sar -q 1
copy
Report paging statistics
$ sar -B 5
copy
Report disk statistics
$ sar -d 1
copy

SYNOPSIS

sar [options] [interval [count]]

DESCRIPTION

sar (System Activity Reporter) collects, reports, and saves system activity information. It can report on CPU, memory, I/O, network, and other subsystem performance.

PARAMETERS

-b

Report I/O and transfer rate statistics
-B
Report paging statistics
-d
Report disk I/O statistics
-n KEYWORD
Report network statistics (DEV, EDEV, NFS, SOCK, IP, etc.)
-q
Report queue length and load averages
-r [ALL]
Report memory utilization statistics
-u [ALL]
Report CPU utilization
-v
Report status of inode, file, and other kernel tables
-w
Report task creation and system switching activity
-W
Report swapping statistics
-y
Report TTY devices activity
-f FILE
Read data from specified file
-o FILE
Write data to specified file
-s TIME
Set start time for report
-e TIME
Set end time for report
-P {cpu|ALL}
Report per-processor statistics
-j {ID|LABEL|PATH|UUID}
Display persistent device names

CAVEATS

Without interval, sar reads from system activity data files. Data is collected by the sadc daemon and stored in /var/log/sa/. Historical data requires sysstat cron jobs to be enabled.

HISTORY

sar is part of the sysstat package, originally from System V Unix. It provides comprehensive system activity reporting and historical data analysis.

SEE ALSO

iostat(1), mpstat(1), pidstat(1), sadc(8)

> TERMINAL_GEAR

Curated for the Linux community

GMKtec Gaming PC, K11 AMD Ryzen 9 8945HS, 32GB DDR5 RAM 1TB Mini PC Desktop Computer, Oculink, Dual NIC 2.5GbE LAN, HDMI/DisplayPort/USB4*2

GMKtec Gaming PC, K11 AMD Ryzen 9 8945HS, 32GB DDR5 RAM 1TB Mini PC Desktop Computer, Oculink, Dual NIC 2.5GbE LAN, HDMI/DisplayPort/USB4*2

$739.99
BOSGAME Mini PC N95, Intel 12th Mini Computers| 16GB DDR4 RAM| 512GB M.2 2280 SSD| 4K 60HZ Triple Displays by Dual HDMI+Type-C, 6W TDP Quiet Mini PC, WIFI5, BT 5.0 Office

BOSGAME Mini PC N95, Intel 12th Mini Computers| 16GB DDR4 RAM| 512GB M.2 2280 SSD| 4K 60HZ Triple Displays by Dual HDMI+Type-C, 6W TDP Quiet Mini PC, WIFI5, BT 5.0 Office

$239.99
nuphy Air75 V2 Portable 75% Mechanical Keyboard,Wireless Keyboard

nuphy Air75 V2 Portable 75% Mechanical Keyboard,Wireless Keyboard

$129.95
Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community

KIWITATA 2X Classic SNES USB Controller for PC Gamings, Retro SNES Wired USB Game Emulator Controller for Windows XP 7 8 11 Mac Raspberry Pi

KIWITATA 2X Classic SNES USB Controller for PC Gamings, Retro SNES Wired USB Game Emulator Controller for Windows XP 7 8 11 Mac Raspberry Pi

$16.99
BOSGAME Mini PC N95, Intel 12th Mini Computers| 16GB DDR4 RAM| 512GB M.2 2280 SSD| 4K 60HZ Triple Displays by Dual HDMI+Type-C, 6W TDP Quiet Mini PC, WIFI5, BT 5.0 Office

BOSGAME Mini PC N95, Intel 12th Mini Computers| 16GB DDR4 RAM| 512GB M.2 2280 SSD| 4K 60HZ Triple Displays by Dual HDMI+Type-C, 6W TDP Quiet Mini PC, WIFI5, BT 5.0 Office

$239.99
Bmax Mini PC B2 Power Intel 5205U 8GB DDR4 256GB M.2 NVMe SSD ,HDMI 1.4&DP 1.2, USB3.2,4K Dual Display 2.4G/5G WiFi & BT5.0 Mini Desktop Computers /Office/Design

Bmax Mini PC B2 Power Intel 5205U 8GB DDR4 256GB M.2 NVMe SSD ,HDMI 1.4&DP 1.2, USB3.2,4K Dual Display 2.4G/5G WiFi & BT5.0 Mini Desktop Computers /Office/Design

$169.99