# Sar (Unix)

> Mediated Wiki article. Canonical URL: https://mediated.wiki/source/Sar_(Unix)
> Markdown URL: https://mediated.wiki/source/Sar_(Unix).md
> Source: https://en.wikipedia.org/wiki/Sar_(Unix)
> Source revision: 1267071658
> License: Creative Commons Attribution-ShareAlike 4.0 International (https://creativecommons.org/licenses/by-sa/4.0/)

**System Activity Report** (**sar**) is a [Unix System V](/source/Unix_System_V)-derived [system monitor](/source/System_monitor) command used to report on various system loads, including [CPU](/source/CPU) activity, memory/paging, interrupts, device load, network and [swap space](/source/Swap_partition) utilization. Sar uses /[proc](/source/Procfs) filesystem for gathering information.[2]

## 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 bsdsar tool, but it is now deprecated.[3]

Most [Linux](/source/Linux) distributions provide sar utility through the sysstat package.

## Syntax

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

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

## Example

[user@localhost]$ sar  # Displays current CPU activity.

## Sysstat package

Additional to sar command, Linux [sysstat](/source/Sysstat) package in Debian,[4] RedHat Enterprise Linux and SuSE provides additional reporting tools:

## See also

- [atopsar](/source/Atopsar)
- [Nmon](/source/Nmon)
- [sag](/source/Sag_(Unix)) - "system activity graph" command[5]
- ksar- BSD licensed Java-based application to create graph of all parameters from the data collected by Unix sar utilities.
- [CURT](/source/CURT), [IBM AIX](/source/IBM_AIX) CPU Usage Reporting Tool
- isag, tcl based command to plot sar/sysstat data

## References

- [Easy system monitoring with SAR (IBM developerWorks)](http://www.ibm.com/developerworks/aix/library/au-unix-perfmonsar.html)
- [System Activity Reporter (Softpanorama)](http://www.softpanorama.org/Admin/Monitoring/sar.shtml)
- [Article on sar at Computerhope](http://www.computerhope.com/unix/usar.htm)

## Footnotes

1. ["Sysstat: Tags"](https://github.com/sysstat/sysstat/tags). *[GitHub](/source/GitHub)*

1. ["SYSSTAT"](http://sebastien.godard.pagesperso-orange.fr/man_sar.html). *sebastien.godard.pagesperso-orange.fr*

1. ["FreshPorts -- sysutils/bsdsar: System Activity Reporter for FreeBSD"](https://www.freshports.org/sysutils/bsdsar). *www.freshports.org*

1. ["Debian -- Details of package sysstat in sid"](https://packages.debian.org/sid/sysstat). *packages.debian.org*

1. ["sag(1)"](https://www.filibeto.org/sun/lib/solaris2.5-docs/40.3/802-1930-01.pdf). *SUNOS Reference Manual*. Mountain View, California: Sun Microsystems. 1993-02-24. pp. 1–895. Retrieved 2010-05-04. sag - system activity graph [...] DESCRIPTION sag graphically displays the system activity data stored in a binary data file by a previous sar(1) run.

---
Adapted from the Wikipedia article [Sar (Unix)](https://en.wikipedia.org/wiki/Sar_(Unix)) by Wikipedia contributors ([contributor history](https://en.wikipedia.org/wiki/Sar_(Unix)?action=history)). Available under [Creative Commons Attribution-ShareAlike 4.0 International](https://creativecommons.org/licenses/by-sa/4.0/). Changes may have been made.
