Sar (Unix) Explained
sar |
Latest Release Version: | sysstat 12.1.1[1] |
Latest Preview Version: | sysstat 11.7.4 |
Latest Preview Date: | [2] |
Programming Language: | C |
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 /[[procfs|proc]]
filesystem for gathering information.[3]
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.[4]
Most Linux distributions provide sar
utility through the sysstat
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
[user@localhost]$ sar # Displays current CPU activity.
Sysstat package
Additional to sar
command, Linux sysstat package in Debian,[5] RedHat Enterprise Linux and SuSE provides additional reporting tools:
See also
- atopsar
- Nmon
[[sag (Unix)|sag]]
- "system activity graph" command[6]
- 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
Notes and References
- Web site: Release v12.1.1: Sysstat-12.1.1 · sysstat/Sysstat. GitHub.
- Web site: SYSSTAT. sebastien.godard.pagesperso-orange.fr.
- Web site: SYSSTAT. sebastien.godard.pagesperso-orange.fr.
- Web site: FreshPorts -- sysutils/bsdsar: System Activity Reporter for FreeBSD. www.freshports.org.
- Web site: Debian -- Details of package sysstat in sid. packages.debian.org.
- Web site: sag(1). 1993-02-24. SUNOS Reference Manual. Sun Microsystems. Mountain View, California. 1–895. 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..