my-server
← Wiki

Sar (Unix)

System Activity Report (<code>sar</code>) 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 <code>/proc</code> filesystem for gathering information.

Platform support

Sar was originally developed for the Unix System V operating system; it is available in AIX, HP-UX, Solaris and other System V based operating systems but it is not available for macOS or FreeBSD. Prior to 2013 there was a <code>bsdsar</code> tool, but it is now deprecated.

Most Linux distributions provide <code>sar</code> utility through the <code>sysstat</code> package.

Syntax

sar [-flags] [ -e time ] [ -f filename ] [-i sec ] [ -s time ]

: 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

Sysstat package

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

See also

  • atopsar
  • Nmon
  • <code>sag</code> - "system activity graph" command
  • ksar- BSD licensed Java-based application to create graph of all parameters from the data collected by Unix sar utilities.
  • CURT, IBM AIX CPU Usage Reporting Tool
  • isag, tcl based command to plot sar/sysstat data

References

Footnotes