sar (Unix)

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

sar
Stable release
sysstat 12.1.1[1] / October 13, 2018 (2018-10-13)
Preview release
sysstat 11.7.4 / June 1, 2018 (2018-06-01) [2]
Repositorygithub.com/sysstat/sysstat/
Written inC
Operating systemAIX, Linux, Solaris, HP-UX
TypeSystem reporting
Websitesebastien.godard.pagesperso-orange.fr//
Called regularly by cron, sadc does the monitoring and stores its measurements to files in the /var/log/sa/ folder. The sar client can be used to explore this data.

Platform support

Sar was originally developed for Solaris operating system[4] 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.[5]

Linux distributions, such as Debian, Red Hat Enterprise Linux, SuSe[6] and Ubuntu 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 package in Debian,[7] RedHat Enterprise Linux and SuSE provides additional reporting tools:

See also

  • atopsar
  • Nmon
  • sag - "system activity graph" command[8]
  • 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

  1. https://github.com/sysstat/sysstat/releases/tag/v12.1.1
  2. http://sebastien.godard.pagesperso-orange.fr/
  3. http://sebastien.godard.pagesperso-orange.fr/man_sar.html
  4. https://www.itworld.com/article/2786092/open-source-tools/unix-tip--using-sar-for-long-term-performance-analysis.html
  5. https://www.freshports.org/sysutils/bsdsar
  6. http://www.softpanorama.org/Admin/Monitoring/sar.shtml
  7. https://packages.debian.org/sid/sysstat
  8. "sag(1)" (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.
This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.