Sar (Unix)


System Activity Report is a Unix System V-derived system monitor command used to report on various system loads, including CPU activity, memory/paging, interrupts, device load, network and swap space utilization. Sar uses /procfilesystem for gathering information

Platform support

Sar was originally developed for Solaris operating system and it is available in Linux, Solaris, AIX, HP-UX, but it is not available for macOS or FreeBSD, until 2013 there was a bsdsar tool actually deprecated.
Linux distributions, such as Debian, Red Hat Enterprise Linux, SuSe and Ubuntu provide sar utility through the sysstat package.

Syntax

sar
; : filename Uses filename as the data source for sar. The default is the current daily data file /var/adm/sa/sadd.
; : time Selects data up to time. The default is 18:00.
; : sec Selects data at intervals as close as possible to sec seconds.

Example


$ sar # Displays current CPU activity.

Sysstat package

Additional to sar command, Linux sysstat package in Debian, RedHat Enterprise Linux and SuSE provides additional reporting tools: